Skip to content

Conversation

@lukeina2z
Copy link
Contributor

ADOT Java currently uses some deprecated incubating semconv keys. This PR adds support for the newly introduced formal semconv keys that replace them, while maintaining backward compatibility by falling back to the legacy keys when necessary.

Deprecated keys:

  • DB_NAME
  • DB_OPERATION
  • DB_STATEMENT
  • DB_SYSTEM

(Reference: https://github.com/open-telemetry/semantic-conventions-java/blob/release/v1.34.0/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java#L322-L327)

New keys:

  • DB_NAMESPACE
  • DB_OPERATION_NAME
  • DB_QUERY_TEXT
  • DB_SYSTEM_NAME

Tests performed:

  • Unit tests: ./gradlew build test
  • Smoke/contract tests: ./gradlew appsignals-tests:contract-tests:contractTests
  • Manual E2E test with SpringBoot sample app.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

ADOT Java currently uses some deprecated incubating semconv keys.
This PR adds support for the newly introduced formal semconv keys that replace them, while maintaining backward compatibility by falling back to the legacy keys when necessary.

**Deprecated keys:**
- DB_NAME
- DB_OPERATION
- DB_STATEMENT
- DB_SYSTEM

(Reference: https://github.com/open-telemetry/semantic-conventions-java/blob/release/v1.34.0/semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java#L322-L327)

**New keys:**
- DB_NAMESPACE
- DB_OPERATION_NAME
- DB_QUERY_TEXT
- DB_SYSTEM_NAME

**Tests performed:**
- Unit tests: `./gradlew build test`
- Smoke/contract tests: `./gradlew appsignals-tests:contract-tests:contractTests`
- Manual E2E test with SpringBoot sample app.
@lukeina2z lukeina2z requested a review from a team as a code owner August 22, 2025 23:14
@codecov-commenter
Copy link

codecov-commenter commented Aug 22, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 85.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.28%. Comparing base (09e6487) to head (df6d3b7).
⚠️ Report is 514 commits behind head on main.

Files with missing lines Patch % Lines
...vaagent/providers/AwsMetricAttributeGenerator.java 86.66% 1 Missing and 1 partial ⚠️
...try/javaagent/providers/AwsSpanProcessingUtil.java 66.66% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #1162       +/-   ##
=============================================
- Coverage     85.71%   67.28%   -18.43%     
- Complexity       19      525      +506     
=============================================
  Files             3       54       +51     
  Lines            49     2693     +2644     
  Branches          5      373      +368     
=============================================
+ Hits             42     1812     +1770     
- Misses            3      746      +743     
- Partials          4      135      +131     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@thpierce thpierce left a comment

Choose a reason for hiding this comment

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

Contract tests use DB_* as well. Do you think we should/should not update them?

@lukeina2z
Copy link
Contributor Author

Contract tests use DB_* as well. Do you think we should/should not update them?

At the moment, no — otherwise the contract tests would fail. The contract tests are running against the JDBC instrumentation library, which still generates the old attributes by default. Once the library is updated and we integrate it, our contract tests will detect the change, and we will update accordingly.

open-telemetry/opentelemetry-java-instrumentation#11575

@lukeina2z lukeina2z merged commit 9e4f05c into aws-observability:main Oct 23, 2025
7 checks passed
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.

3 participants