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

Zipkin span start time and duration sanitizer #333

Conversation

pavolloffay
Copy link
Member

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 44c6dd5 on pavolloffay:zipkin-start-time-duration-sanitizer into db9f152 on uber:master.

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.

minor nits

if anno.Value == zc.CLIENT_SEND {
span.Timestamp = &anno.Timestamp
return span
} else if anno.Value == zc.SERVER_RECV && span.ParentID == nil {
Copy link
Member

Choose a reason for hiding this comment

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

else is redundant since previous if ends with return

span.Timestamp = &anno.Timestamp
return span
} else if anno.Value == zc.SERVER_RECV && span.ParentID == nil {
span.Timestamp = &anno.Timestamp
Copy link
Member

Choose a reason for hiding this comment

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

comment explaining why not breaking out of loop in this case?

}
if first != last {
duration := last - first
span.Duration = &duration
Copy link
Member

Choose a reason for hiding this comment

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

double allocation with L85 - better to declare local var duration and do span.Duration = &duration at the end of if

last = anno.Timestamp
}
}
if first != last {
Copy link
Member

Choose a reason for hiding this comment

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

maybe first < last? Otherwise you can assign negative TS

@pavolloffay pavolloffay force-pushed the zipkin-start-time-duration-sanitizer branch from 44c6dd5 to 675c709 Compare August 15, 2017 04:53
@pavolloffay
Copy link
Member Author

@yurishkuro thanks for the quick look. PR updated

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 675c709 on pavolloffay:zipkin-start-time-duration-sanitizer into db9f152 on uber:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 65d6cbf on pavolloffay:zipkin-start-time-duration-sanitizer into db9f152 on uber:master.

@pavolloffay pavolloffay reopened this Aug 15, 2017
@pavolloffay
Copy link
Member Author

close/open to trigger travis build.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 65d6cbf on pavolloffay:zipkin-start-time-duration-sanitizer into db9f152 on uber:master.

@yurishkuro yurishkuro merged commit 79fba12 into jaegertracing:master Aug 15, 2017
ideepika pushed a commit to ideepika/jaeger that referenced this pull request Oct 22, 2017
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