Skip to content

Set url.full attribute on spans logged for HTTP requests#906

Open
ahoppen wants to merge 1 commit into
swift-server:mainfrom
ahoppen:set-url-span
Open

Set url.full attribute on spans logged for HTTP requests#906
ahoppen wants to merge 1 commit into
swift-server:mainfrom
ahoppen:set-url-span

Conversation

@ahoppen
Copy link
Copy Markdown

@ahoppen ahoppen commented May 22, 2026

We previously only set the request method on these spans, which made it hard to identify which exact HTTP request was causing this span to be emitted.

Also record the URL of the HTTP request to add more information to these spans. While at it, also record the request body size because we already had an attribute key configured for it.

Comment thread Sources/AsyncHTTPClient/TracingSupport.swift Outdated
We previously only set the request method on these spans, which made it hard to identify which exact HTTP request was causing this span to be emitted.

Also record the URL of the HTTP request to add more information to these spans. While at it, also record the request body size because we already had an attribute key configured for it.
@ahoppen
Copy link
Copy Markdown
Author

ahoppen commented Jun 1, 2026

Added the more scoped logging and configuration options to opt into full URL logging and to opt out to path logging.

I chose to mark DeconstructedURL as @usableFromInline so that I can use it for the structured field tracing. Let me know if there’s an issue with that.

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