Skip to content

Conversation

Machyne
Copy link

@Machyne Machyne commented Sep 25, 2025

Description

Adds a feature gate to use the latest semantic conventions for the status code attribute on generated metrics. Changes:

Old Attribute New Attribute
status.code=STATUS_CODE_ERROR otel.status_code=ERROR
status.code=STATUS_CODE_OK otel.status_code=OK
status.code=STATUS_CODE_UNSET (no attribute)

Link to tracking issue

Partially Fixes #42103

Testing

Added new test case "Test using new status code attribute"

Documentation

[ ] TODO: looking for advice on documentation; do I need to add anything for the new feature gate?

@Machyne Machyne requested a review from a team as a code owner September 25, 2025 22:40
@Machyne Machyne requested a review from crobert-1 September 25, 2025 22:40
@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Sep 25, 2025
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it's a breaking change

component: spanmetricsconnector

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Add a feature gate to use the latest semantic conventions for the status code attribute on generated metrics.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: We can use subtext to explain the rationale behind introducing this breaking change, as well as how to use feature gates to roll it back.

In note we explicitly say that the key of span status change from status.code to otel.status_code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[connector/spanmetrics] improvements to config and schema of output RED metrics
3 participants