-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Adjuster fixes. #606
Adjuster fixes. #606
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
model/adjuster/clockskew.go
Outdated
@@ -53,6 +51,10 @@ const ( | |||
warningFormatInvalidParentID = "invalid parent span IDs=%s; skipping clock skew adjustment" | |||
) | |||
|
|||
var ( | |||
hostKeyTags = []string{"jaeger.hostname", "ip"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also should add "hostname"
, it's used in Go client
model/adjuster/clockskew_test.go
Outdated
{ | ||
tags: []model.KeyValue{ | ||
model.String("ip", "1.2.3.4"), | ||
model.String("jaeger.hostname", "localhost"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't ip
be given priority in this case?
Now we try to find the tag from the predefined set which is most common in the process tags
I don't think looking for a common host tag is a good idea. Different services may be instrumented with different versions of Jaeger clients, in different languages. Ideally we'd want them all to converge on the same way of representing the host identity, but even if we did this in the latest versions of all clients it will take a long time for all services in a large org to upgrade. The host identity is used to ensure that the timestamp adjustments from spans from the same host are the same. While this may look like it might apply to different services, in practice it's more likely that when service A calls service B the instances of those two services will be running on different hosts. So the problem is really avoiding ts adjustments from spans in the same service, which is a problem that does not require a common host tag because those spans will all come from the same version of the client lib, therefore any stable algorithm of selecting a host tag will do, such as what you had in the first commit by simply iterating through an array of known host tags (the order in the array implies a priority). |
Per offline discussion, my proposal is:
|
Closing old inactive PR |
For some app, it is hard to determine IP tag value. That's why for some cases clock-skew adjustment done wrong. In the PR multiple tags support was added.