Skip to content

Fix type of http.response.status_code attribute#287

Open
NthPortal wants to merge 1 commit into
TrueLayer:mainfrom
NthPortal:patch-1
Open

Fix type of http.response.status_code attribute#287
NthPortal wants to merge 1 commit into
TrueLayer:mainfrom
NthPortal:patch-1

Conversation

@NthPortal

Copy link
Copy Markdown

tracing widens u16 to u64 when using it as an attribute (see here), but tracing-opentelemetry does not (and cannot) handle u64 (see here), so it defaults to being recorded as a string. explicitly converting from u16 to i64 allows the attribute to be recorded properly by tracing-opentelemetry.

I have tested this change locally, and it correctly records the value in opentelemetry spans as an i64. I did not see any current tests where I could easily add a couple lines to assert this change, and I'm not sure how you'd want to test something like that.

relatedly, server.port is also incorrectly recorded as a string, but I have been unable to determine why, given that it is explicitly converted to i64

@NthPortal NthPortal requested a review from a team as a code owner June 9, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant