Skip to content

impl(o11y): introduce http.response.status_code#12312

Draft
diegomarquezp wants to merge 6 commits intomainfrom
observability/tracing-attr/status-code
Draft

impl(o11y): introduce http.response.status_code#12312
diegomarquezp wants to merge 6 commits intomainfrom
observability/tracing-attr/status-code

Conversation

@diegomarquezp
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements status code reporting for both gRPC and HTTP transports within OpenTelemetry spans. It introduces a new HTTP status code attribute, adds utility methods in ObservabilityUtils to extract status codes from exceptions based on the transport type, and updates SpanTracer to ensure these attributes are recorded when an attempt finishes. A redundant else if block for Long types was identified in the OpenTelemetry attribute mapping logic.

Comment on lines +112 to 114
} else if (v instanceof Long) {
attributesBuilder.put(k, (Long) v);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This else if block to handle Long types appears to be redundant. The surrounding code context (line 109, attributesBuilder.put(k, (Long) v)) suggests there is already logic to handle Long values. If so, this new block is unreachable code and should be removed.

@diegomarquezp diegomarquezp added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 30, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 30, 2026
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