Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about time adjustment in tags #2052

Merged

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Feb 2, 2020

Time adjustment is confusing to many people, as you can see in #961.

This change adds a warning if we do any time adjustments, so that it's at least clear that adjustments happened.

@bobrik bobrik requested a review from a team as a code owner February 2, 2020 04:59
@bobrik
Copy link
Contributor Author

bobrik commented Feb 2, 2020

I spent a few hours trying to figure out how on earth can a span for 301 redirect follow can happen before the first request that triggered said redirect finished.

image

The reason was that tracing with futures is hard and redirect following span outlived its parent, which triggered an adjustment. This adjustment may or may not be a good idea, but let's at least be clear it happened, so people can save some time in the future:

image

@codecov
Copy link

codecov bot commented Feb 2, 2020

Codecov Report

Merging #2052 into master will decrease coverage by 0.81%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2052      +/-   ##
==========================================
- Coverage   98.21%   97.39%   -0.82%     
==========================================
  Files         195      207      +12     
  Lines        9602    10307     +705     
==========================================
+ Hits         9431    10039     +608     
- Misses        134      224      +90     
- Partials       37       44       +7
Impacted Files Coverage Δ
model/adjuster/clockskew.go 100% <100%> (ø) ⬆️
cmd/agent/app/reporter/flags.go 68.75% <0%> (-31.25%) ⬇️
cmd/agent/app/flags.go 92.3% <0%> (-7.7%) ⬇️
pkg/queue/bounded_queue.go 93.58% <0%> (-6.42%) ⬇️
...gin/storage/cassandra/spanstore/operation_names.go 97.59% <0%> (-2.41%) ⬇️
cmd/collector/app/span_processor.go 98.43% <0%> (-1.57%) ⬇️
plugin/storage/cassandra/spanstore/reader.go 100% <0%> (ø) ⬆️
cmd/collector/app/builder/span_handler_builder.go 100% <0%> (ø) ⬆️
cmd/agent/app/reporter/tchannel/collector_proxy.go 100% <0%> (ø) ⬆️
cmd/collector/app/metrics.go 100% <0%> (ø) ⬆️
... and 56 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d339ef...a8cb126. Read the comment docs.

Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should use span.tags for that, but rather span.warnings, which we are already using for some messages about clock skew adjustment.

The URL doesn't seem to be necessary.

Please add a unit test to check for the expected outcome.

@bobrik bobrik force-pushed the ivan/warn-about-time-adjustment branch from fa840cb to d563c91 Compare February 2, 2020 19:52
@bobrik
Copy link
Contributor Author

bobrik commented Feb 2, 2020

It definitely looks better as a warning, updated:

image

Time adjustment is confusing to many people, as you can see in jaegertracing#961.

This change adds a warning if we do any time adjustments,
so that it's at least clear that adjustments happened.

Signed-off-by: Ivan Babrou <github@ivan.computer>
@bobrik bobrik force-pushed the ivan/warn-about-time-adjustment branch from d563c91 to a8cb126 Compare February 2, 2020 19:56
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yurishkuro yurishkuro merged commit c29449a into jaegertracing:master Feb 2, 2020
@prongs
Copy link

prongs commented Jun 16, 2020

Any traction on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants