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

integrate some basic opentelemetry tracing #734

Merged
merged 3 commits into from
Jul 30, 2021
Merged

Conversation

whyrusleeping
Copy link
Contributor

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.

Copy link
Member

@Stebalien Stebalien left a 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("")
Copy link
Member

Choose a reason for hiding this comment

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

name?

Copy link
Contributor Author

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.

Copy link
Member

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")
Copy link
Member

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?

@Stebalien Stebalien merged commit 3cefab2 into master Jul 30, 2021
@Stebalien Stebalien deleted the feat/opentel-tracing branch July 30, 2021 03:29
@aschmahmann aschmahmann mentioned this pull request Aug 23, 2021
62 tasks
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.

2 participants