Skip to content

Conversation

@sudarshan12s
Copy link
Contributor

@sudarshan12s sudarshan12s commented Dec 10, 2025

Fixes #2147

Changes

Updated the db.namespace attribute definition to represent only the database’s
unique identifier. Information previously bundled into db.namespace—including
PDB name, instance name, and service name—has been moved to dedicated attributes:
oracle.db.pdb, oracle.db.instance.name, and oracle.db.service.

Introduced a new oracle.db.domain attribute to capture the database domain
(DB_DOMAIN).

Issue 2147 recommended splitting db.namespace into multiple attributes. The db.namespace attribute represents the database’s unique identifier, as defined in the Oracle documentation for DB_UNIQUE_NAME

Additional attributes have been introduced to capture other properties of the connection:

  • oracle.db.domain - The database domain associated with the connection.
  • oracle.db.instance.name - The instance name associated with the connection in an Oracle Real Application Clusters environment.
  • oracle.db.name - The database name associated with the connection.
  • oracle.db.pdb - The pluggable database (PDB) name associated with the connection
  • oracle.db.service - The service name currently associated with the database connection.

Notes:

  • These attributes are available only after a successful login. They are not included on spans for failed logins.

  • The connection string can be supplied in multiple formats, making it difficult to reliably extract attributes such as the service name:
    - TNS alias – A name resolved using tnsnames.ora file.
    - EZConnect – hostname:port/serviceName, among other variants.

  • The service name provided by the user may change after a successful connection. oracle.db.service reflects the final, effective service name. For example, when using Oracle Global Data Services (GDS), a user-supplied global service name such as srv1.shpool.oradbcloud may resolve to east%srv1.shpool.oradbcloud.

  • For global services, oracle.db.name identifies the logical database name, while db.namespace provides the unique identity of the physical database.

Please suggest If I have to split this PR for db.namespace and other oracle db specific attributes (oracle.db...)

Important

Pull requests acceptance are subject to the triage process as described in Issue and PR Triage Management.
PRs that do not follow the guidance above, may be automatically rejected and closed.

Merge requirement checklist

  • CONTRIBUTING.md guidelines followed.
  • Change log entry added, according to the guidelines in When to add a changelog entry.
    • If your PR does not need a change log, start the PR title with [chore]
  • Links to the prototypes or existing instrumentations (when adding or changing conventions)

@github-actions
Copy link

This PR contains changes to area(s) that do not have an active SIG/project and will be auto-closed:

  • oracledb
  • db

Such changes may be rejected or put on hold until a new SIG/project is established.

Please refer to the Semantic Convention Areas
document to see the current active SIGs and also to learn how to kick start a new one.

@github-actions
Copy link

This PR contains changes to area(s) that do not have an active SIG/project and will be auto-closed:

  • oracledb
  • db

Such changes may be rejected or put on hold until a new SIG/project is established.

Please refer to the Semantic Convention Areas
document to see the current active SIGs and also to learn how to kick start a new one.

@sudarshan12s
Copy link
Contributor Author

CC @open-telemetry/semconv-db-approvers , Can this PR be triaged.

Thanks.

Copy link

@sharadraju sharadraju left a comment

Choose a reason for hiding this comment

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

LGTM

distributed environment. Its value consists of one or more valid identifiers
(alphanumeric ASCII characters) separated by periods.

**[18] `oracle.db.instance.name`:** There can be multiple instances associated with a single database service. It indicates the

Choose a reason for hiding this comment

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

Is this only specific to RAC? What value will it have for non-RAC instances?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is available for non-RAC database too but it will be defaulted to db_name value.

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

This PR has been labeled as stale due to lack of activity. It will be automatically closed if there is no further activity over the next 7 days.

@github-actions github-actions bot added the Stale label Jan 8, 2026
Copy link

@sharadraju sharadraju left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants