Repository navigation
Improve OTel bridge mapping of newer semcon for databases - #2768
Merged
Merged
Conversation
🤖 GitHub commentsJust comment with:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the OpenTelemetry bridge’s database span mapping to support newer OTel semantic conventions and ensure the resulting spans populate the ECS fields used by Kibana (service map/dependencies).
Changes:
- Add support for newer DB attributes (
db.system.name,db.namespace,db.query.text) while preserving compatibility with legacy keys (db.system,db.name,db.statement). - Improve destination mapping by recognizing stable network attributes (
network.peer.address,network.peer.port) and correctly handling numeric port tag types. - Normalize
azure.cosmosdbtocosmosdbfor ECS-mapped fields, while keeping the raw OTel attribute value inotel.attributes, and add comprehensive regression tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/opentelemetry/Elastic.Apm.OpenTelemetry.Tests/OTelDbSpanTests.cs | New end-to-end tests covering old/new DB semconv mappings, destination resolution, action normalization, and Cosmos DB subtype normalization. |
| test/opentelemetry/Elastic.Apm.OpenTelemetry.Tests/OpenTelemetryTests.cs | Strengthens an existing span-kind test to assert DB context mapping is populated. |
| src/Elastic.Apm/OpenTelemetry/SemanticConventions.cs | Adds constants for newer DB and stable network semantic convention keys. |
| src/Elastic.Apm/OpenTelemetry/OTelActivityMapper.cs | Implements the new DB attribute mapping logic, destination attribute fallbacks, and Cosmos DB subtype normalization. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
trentm
approved these changes
Jun 11, 2026
This was referenced Oct 1, 2026
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.
Updates the OTel bridge to handle newer semantic conventions, ensuring these map to required ECS fields on the spans that drive the Kibana UI (service map and dependencies).