Repository navigation
NH-152875 Update imports of OTel span/resource attributes - #920
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the OpenTelemetry attribute-import update.
No open issues 🎉
What changed in this PR
Modernizes OpenTelemetry span and resource attribute imports in the SolarWinds APM distribution while preserving existing attribute keys and deprecated HTTP fallbacks.
Changes:
- Replaces
SpanAttributesandResourceAttributesreferences with constants from stable and incubating attribute modules. - Updates resource-detector tests to use the same constants.
- Simplifies HTTP-span detection tests by using real attribute constants and
SpanKindvalues instead of mocking them.
| File | Description |
|---|---|
tests/unit/test_uams.py |
Uses HOST_ID in resource assertions. |
tests/unit/test_processors/test_response_time_processor.py |
Uses real HTTP constants and span kinds in detection tests. |
tests/unit/test_k8s.py |
Uses individual Kubernetes constants in assertions. |
solarwinds_apm/uams.py |
Imports HOST_ID from the incubating host module. |
solarwinds_apm/trace/serviceentry_processor.py |
Updates function-name, HTTP-route, and URL-path attribute imports. |
solarwinds_apm/trace/response_time_processor.py |
Updates HTTP attribute imports while retaining deprecated fallbacks. |
solarwinds_apm/k8s.py |
Imports resource keys from the stable Kubernetes attribute module. |
Review effort: Balanced
tammy-baylis-swi
marked this pull request as ready for review
November 5, 2026 16:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update imports of OTel span/resource attributes. Some are still for old, deprecated attributes such as
http.methodthat APM uses as fallbacks. We can remove those in another PR.