-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(gw): tracing spans per response type #8841
Conversation
Adds more visibility into how long generic lookup takes vs producing specific response type.
@guseggert to make this easier to review, this PR points at your branch. If this looks good, feel free to merge, and we can continue in #8595 |
@@ -70,7 +70,7 @@ test_go_fmt: | |||
TEST_GO += test_go_fmt | |||
|
|||
test_go_lint: test/bin/golangci-lint | |||
golangci-lint run ./... | |||
golangci-lint run --timeout=3m ./... |
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.
This helps with flaky CI.
func (i *gatewayHandler) serveRawBlock(w http.ResponseWriter, r *http.Request, blockCid cid.Cid, contentPath ipath.Path, begin time.Time) { | ||
blockReader, err := i.api.Block().Get(r.Context(), contentPath) | ||
func (i *gatewayHandler) serveRawBlock(w http.ResponseWriter, r *http.Request, resolvedPath ipath.Resolved, contentPath ipath.Path, begin time.Time) { | ||
ctx, span := tracing.Span(r.Context(), "Gateway", "ServeRawBlock", trace.WithAttributes(attribute.String("path", resolvedPath.String()))) |
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.
Do we need this attribute, since the path is already on the parent span?
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.
My understanding is yes: one may want to inspect this span on its own + this path is "resolved one", so it adds additional context when /ipns/
was used for initial request (no need to look at all Resolve operations before it to find out final path)
* add deprecation warning when tracer plugins are loaded * add response format attribute to span in gateway handler * add note about tracing's experimental status in godoc * add nil check for TTL when adding name span attrs * add basic sharness test for integration with otel collector * add nil check in UnixFSAPI.processLink * test: sharness check all json objs for swarm span * add env var docs to docs/environment-variables.md * chore: pin the otel collector version * add tracing spans per response type (#8841) * docs: tracing with jaeger-ui Co-authored-by: Marcin Rataj <lidel@lidel.org>
This PR extends #8595 with spans for each response type from #8758
Adds more visibility into how long generic lookup takes vs producing specific response type.
Demo