Skip to content

Breaking changes to db.system attribute in OpenTelemetry Semantic Conventions v1.30.0 #4640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
matt-hensley opened this issue Jan 29, 2025 · 7 comments · May be fixed by #4916
Open

Breaking changes to db.system attribute in OpenTelemetry Semantic Conventions v1.30.0 #4640

matt-hensley opened this issue Jan 29, 2025 · 7 comments · May be fixed by #4916
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed keepalive Label to exempt Issues / PRs from stale workflow

Comments

@matt-hensley
Copy link

Is your feature request related to a problem? Please describe.

v1.30.0 of OpenTelemetry Semantic Conventions has two breaking changes to the db.system attribute. This will impact the ability for the metrics-generator to create virtual nodes in service graphs.

The breaking changes are:

  • Attribute renamed from db.system to db.system.name
  • List of constants for recognized databases updated

Describe the solution you'd like

db.system.name recognized as a peer attribute for service graph metrics generation.

Additional context

Diff between releases v1.29.0 and v1.30.0

@joe-elliott
Copy link
Member

It looks like we default to db.name. If we don't find that we try db.system. Do you think this new attribute should take priority over both of these?

So we would look for the following in order and use the first one we found?

  • db.system.name
  • db.name
  • dby.system

// Check for db.name first. The dbName is set initially to maintain backwards compatbility.
if name, ok := processor_util.FindAttributeValue(string(semconv.DBNameKey), resourceAttr, span.Attributes); ok {
dbName = name
isDatabase = true
}
// Check for db.system only if we don't have db.name above
if !isDatabase {
if _, ok := processor_util.FindAttributeValue(string(semconv.DBSystemKey), resourceAttr, span.Attributes); ok {
isDatabase = true
}
}

@joe-elliott joe-elliott added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 29, 2025
@matt-hensley
Copy link
Author

db.name was renamed to db.namespace in v1.26.0.

Looking at the current implementation, this ordering would preserve current behavior while supporting the new names:

  • db.name
  • db.namespace
  • db.system
  • db.system.name

@matt-hensley
Copy link
Author

matt-hensley commented Jan 29, 2025

Blocked by:

@iamrajiv
Copy link

iamrajiv commented Feb 3, 2025

@matt-hensley I want to work on this. Can you assign it to me?

Copy link
Contributor

github-actions bot commented Apr 5, 2025

This issue has been automatically marked as stale because it has not had any activity in the past 60 days.
The next time this stale check runs, the stale label will be removed if there is new activity. The issue will be closed after 15 days if there is no new activity.
Please apply keepalive label to exempt this Issue.

@github-actions github-actions bot added the stale Used for stale issues / PRs label Apr 5, 2025
@joe-elliott joe-elliott added keepalive Label to exempt Issues / PRs from stale workflow and removed stale Used for stale issues / PRs labels Apr 7, 2025
@cyrille-leclerc
Copy link
Contributor

I'm bumping this issue as discussed with @cedricziel as OTel practitioners no longer see their databases

@rlankfo
Copy link
Member

rlankfo commented Apr 14, 2025

As suggested previously, we should make this database name attribute configurable on the service graph processor. That way, if this convention changes yet again, we don't have to worry about making code changes to support the change.

See #4656 (review)

This was done in the otel contrib service graph connector. This config param was recently to support a prioritized list of attribute names for db identification: open-telemetry/opentelemetry-collector-contrib#39133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed keepalive Label to exempt Issues / PRs from stale workflow
Projects
None yet
5 participants