Skip to content

Commit

Permalink
review yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
lmolkova committed May 7, 2024
1 parent 8e901f8 commit 2dd4a0d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 30 deletions.
29 changes: 0 additions & 29 deletions model/db-common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,3 @@ groups:
The `error.type` SHOULD match the error code returned by the database or the client library,
the canonical name of exception that occurred, or another low-cardinality error identifier.
Instrumentations SHOULD document the list of errors they report.
- id: attributes.db.client.all_common
type: attribute_group
brief: This group documents attributes that describe database call along with network information.
extends: attributes.db.client.minimal
attributes:
- ref: db.collection.name
requirement_level:
conditionally_required: >
If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture
`db.collection.name`, then it SHOULD be the first collection name found in the query.
- ref: db.system
# TODO: Not adding to the minimal because of https://github.com/open-telemetry/build-tools/issues/192
requirement_level: required
- ref: network.peer.address
brief: Peer address of the database node where the operation was performed.
requirement_level:
recommended: If applicable for this database system.
note: >
Semantic conventions for individual database systems SHOULD document whether `network.peer.*` attributes are applicable.
Network peer address and port are useful when the application interacts with individual database nodes directly.
If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
- ref: network.peer.port
requirement_level:
recommended: If and only if `network.peer.address` is set.
- ref: db.namespace
requirement_level:
conditionally_required: If available.
25 changes: 24 additions & 1 deletion model/metrics/database-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,31 @@ groups:
instrument: histogram
unit: "s"
stability: experimental
extends: attributes.db.client.all_common
extends: attributes.db.client.minimal
attributes:
- ref: db.collection.name
requirement_level:
conditionally_required: >
If readily available. Otherwise, if the instrumentation library parses `db.query.text` to capture
`db.collection.name`, then it SHOULD be the first collection name found in the query.
- ref: db.system
# TODO: Not adding to the minimal because of https://github.com/open-telemetry/build-tools/issues/192
requirement_level: required
- ref: network.peer.address
brief: Peer address of the database node where the operation was performed.
requirement_level:
recommended: If applicable for this database system.
note: >
Semantic conventions for individual database systems SHOULD document whether `network.peer.*` attributes are applicable.
Network peer address and port are useful when the application interacts with individual database nodes directly.
If a database operation involved multiple network calls (for example retries), the address of the last contacted node SHOULD be used.
- ref: network.peer.port
requirement_level:
recommended: If and only if `network.peer.address` is set.
- ref: db.namespace
requirement_level:
conditionally_required: If available.
- id: metric.db.client.connection.count
type: metric
metric_name: db.client.connection.count
Expand Down

0 comments on commit 2dd4a0d

Please sign in to comment.