-
Notifications
You must be signed in to change notification settings - Fork 229
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
integrate some basic opentelemetry tracing #734
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.
Seems reasonable.
) | ||
|
||
var Tracer = otel.Tracer("") |
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.
name?
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.
empty string uses the default tracer instance, which is fine because this isnt a top level application.
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.
Ah, got it.
@@ -390,6 +395,9 @@ func workers(numWorkers int, fn func(interface{}), inputs <-chan interface{}) { | |||
} | |||
|
|||
func (dht *FullRT) GetClosestPeers(ctx context.Context, key string) ([]peer.ID, error) { | |||
ctx, span := Tracer.Start(ctx, "GetClosestPeers") |
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.
Tell the error to go deal with itself?
Working on getting better insight to why things are randomly slow. Having this sort of insight will help a lot.
Please recommend other things that are worth tracing, or other attributes i should add to the existing spans.