-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #805 from mxiamxia/db-resource
Add support on Database RemoteResourceType and RemoteResourceIdentifier If we detect the span is a [Database span](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/database/database-spans.md) (by the existence of the `db.system`, `db.operation`, or `db.statement` attributes, except in the case of a [AWS SDK span](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/cloud-providers/aws-sdk.md), like DynamoDB SDK calls), we will provide a `RemoteResourceType` and `RemoteResourceIdentifier` as follows: 1. If an address attribute is present, and if a port attribute and/or db.name attribute is optionally present 1. RemoteResourceType = DB::Connection 2. RemoteResourceIdentifier = [db.name|]? {**address**} [|{**port**}]? 1. If any attribute contains | or ^ , they will be replaced with ^| or ^^ , respectively 2. If address is not present, neither RemoteResourceType nor RemoteResourceIdentifier will be provided. #### Note: * {**address**} attribute is retrieved in priority order: - server.address - network.peer.address - server.socket.address - db.connection_string#getHost * {**port**}] attribute is retrieved in priority order: - server.port - network.peer.port - server.socket.port - db.connection_string#getPort By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
3 changed files
with
303 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.