Skip to content

NH-152875 Update imports of OTel span/resource attributes - #920

Merged
tammy-baylis-swi merged 1 commit into
mainfrom
NH-152875-update-attr-import
Nov 5, 2026
Merged

tammy-baylis-swi merged 1 commit into
mainfrom
NH-152875-update-attr-import

Conversation

@tammy-baylis-swi

Copy link
Copy Markdown
Contributor

Update imports of OTel span/resource attributes. Some are still for old, deprecated attributes such as http.method that APM uses as fallbacks. We can remove those in another PR.

Copilot AI left a comment

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.

🟢 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 SpanAttributes and ResourceAttributes references 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 SpanKind values 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
tammy-baylis-swi marked this pull request as ready for review November 5, 2026 16:08
@tammy-baylis-swi
tammy-baylis-swi requested review from a team as code owners November 5, 2026 16:08

@jerrytfleung jerrytfleung left a comment

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.

LGTM

@tammy-baylis-swi
tammy-baylis-swi merged commit c4e858b into main Nov 5, 2026
60 checks passed
@tammy-baylis-swi
tammy-baylis-swi deleted the NH-152875-update-attr-import branch November 5, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants