Skip to content

Conversation

paolorotolo
Copy link
Contributor

What does this PR do?

This PR extracts the code to handle OTEL reserved attributes when setting a new key with setAttribute(@NonNull String key, @Nullable String value) and applies it also to the setAttribute(AttributeKey<T> key, @Nullable T value) method.

Test coverage has also been added to OtelSpanBuilder.

Motivation

Setting OTEL reserved attributes with:

spanBuilder.setAttribute(stringKey("operation.name"), "op_name")

or

val attributes = Attributes.builder().put("operation.name", "op_name").build()
spanBuilder.setAllAttributes(attributes)

had no result using the latest dd-sdk-android release.

See #2935 for more info.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@paolorotolo paolorotolo requested review from a team as code owners October 14, 2025 12:48
@satween
Copy link
Contributor

satween commented Oct 16, 2025

Note

Everything looks good to me, but we cannot merge this PR because it was made from a forked repository. I moved all your changes here and will merge them when they pass all the required checks.

This PR will be closed. Thank you for the contribution!

@satween
Copy link
Contributor

satween commented Oct 17, 2025

Closed as all changes merged in #2946.

@satween satween closed this Oct 17, 2025
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