Skip to content

Update OpenTelemetry dependencies and use experimental semantic convention constants#3567

Open
ChihweiLHBird wants to merge 1 commit into
spinframework:mainfrom
ChihweiLHBird:upgrade-otel-crates
Open

Update OpenTelemetry dependencies and use experimental semantic convention constants#3567
ChihweiLHBird wants to merge 1 commit into
spinframework:mainfrom
ChihweiLHBird:upgrade-otel-crates

Conversation

@ChihweiLHBird

@ChihweiLHBird ChihweiLHBird commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade the OpenTelemetry dependency stack to the 0.29-compatible releases.
    • We can't upgrade to 0.30 cleanly due to a upstream breaking change in opentelemetry_sdk::metrics::data::ResourceMetrics.
  • Replace hard-coded semantic convention attribute strings with constants from opentelemetry-semantic-conventions.
  • Migrate outbound database and networking spans away from deprecated attribute names where the semantic conventions crate provides newer names. (may be breaking)
  • Adjust OpenTelemetry SDK usage for the updated log processor resource API.

Details

Continue previous work of compile-time references for the emitted attribute keys and makes future semantic convention migrations easier to identify during dependency updates.

The workspace enables semconv_experimental because Spin was already emitting experimental semantic convention attributes as string literals before this change, including attributes such as http.response.body.size and db.namespace. Enabling the feature does not introduce new telemetry concepts by itself; it lets the existing experimental attribute names come from the same upstream conventions crate as the stable attributes.

Breaking Changes / Compatibility

This changes some emitted OpenTelemetry span attribute names as part of replacing deprecated semantic convention attributes with their newer equivalents. Consumers that collects these attributes should update their telemetry rules accordingly.

Notable replacements include:

  • db.system -> db.system.name
  • db.address -> server.address

Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
@ChihweiLHBird ChihweiLHBird changed the title Update OpenTelemetry dependencies and semantic convention attributes Update OpenTelemetry dependencies and add experimental semantic convention attributes Jun 12, 2026
@ChihweiLHBird ChihweiLHBird changed the title Update OpenTelemetry dependencies and add experimental semantic convention attributes Update OpenTelemetry dependencies and use experimental semantic convention constants Jun 12, 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.

1 participant