Skip to content

feat(api): annotate HTTP spans with status and semantic attributes#5503

Open
gacevicljubisa wants to merge 1 commit into
feat/otel-resource-enrichmentfrom
feat/http-span-annotations
Open

feat(api): annotate HTTP spans with status and semantic attributes#5503
gacevicljubisa wants to merge 1 commit into
feat/otel-resource-enrichmentfrom
feat/http-span-annotations

Conversation

@gacevicljubisa

Copy link
Copy Markdown
Member

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Makes HTTP API spans queryable in Tempo and tidies tracing naming. Beacuse failed HTTP requests couldn't be filtered by status=error and Grafana's HTTP/APM views had nothing to key off. Complements #5502's node-level resource/baggage work at the request level.

  • newTracingHandler: set SpanKind=Server, add http.request.method /
    http.route / http.response.status_code, and map 5xx → span status Error
    (4xx stays Unset, still queryable via the status-code attribute).
  • Rename tagIDtag_id (pushsync, bytes, bzz) for lower_snake_case consistency.
  • Standardize span names post_bytes/post_bzzbytes-post/bzz-post
    (logger tree names left unchanged).
  • Add tracing.NewTracerFromProvider + a unit test covering the 200 and 500 paths.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

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.

1 participant