[LFXV2-1737] feat(otel): instrument outbound HTTP clients#37
Merged
Conversation
🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1737 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Move net/http into the stdlib import group, add a 10s timeout to the JWKS otelhttp client, and add config.Timeout to the Auth0 otelhttp client. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1737 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
There was a problem hiding this comment.
Pull request overview
Adds OpenTelemetry instrumentation to outbound HTTP calls so external dependencies (Heimdall JWKS fetch, Auth0 token acquisition, and ITX API calls) show up in distributed traces, and bounds JWKS fetch latency with an explicit timeout.
Changes:
- Wrap Auth0 and ITX HTTP client transports with
otelhttp.NewTransportfor outbound span creation. - Add an otel-instrumented JWKS HTTP client and enforce a
jwksClientTimeout(10s) for key retrieval.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/infrastructure/proxy/client.go | Instruments Auth0 token and ITX API outbound HTTP transports with otelhttp. |
| internal/infrastructure/auth/jwt.go | Instruments JWKS fetch client with otelhttp and adds a 10s JWKS client timeout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The comment said otelClient was used for "both Auth0 token requests and ITX API calls" — otelClient is only passed to the Auth0 SDK; ITX API calls are instrumented separately via httpClient. Update the comment to accurately describe the two distinct instrumented clients. Resolves 1 review thread (copilot-pull-request-reviewer). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1737 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Contributor
Author
Review Feedback AddressedCommit: 623aec8 Changes Made
Threads Resolved1 of 1 unresolved threads addressed. |
Contributor
Author
Review Feedback AddressedNo Code Change Needed
PR Descriptions UpdatedUpdated descriptions on all 4 affected PRs (voting #37, meeting #182, mailing-list #64, survey #26) to accurately describe the tracing behavior:
Threads Resolved1 of 1 unresolved threads addressed in this iteration. |
jordane
approved these changes
May 27, 2026
andrest50
approved these changes
May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Part of LFXV2-1737.
otelhttp.NewTransportso Heimdall key-fetch requests appear as child spans in distributed tracesotelhttp.NewTransportso token acquisition appears in traces; Auth0 spans are independent (not child spans of inbound requests) because the token source usescontext.Background()— it is shared and cached across requestsotelhttp.NewTransportso ITX calls appear as child spans of inbound request spansjwksClientTimeout(10s) to bound JWKS fetch time; usesconfig.Timeoutfor the Auth0 clientnet/httpmoved into stdlib group pergoimports)🤖 Generated with Claude Code