Skip to content

Commit

Permalink
Rename db.client.connections.* to db.client.connection.*
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkalapos committed Apr 25, 2024
1 parent 55850b5 commit 8862118
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .chloggen/db_client_connection_metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ change_type: breaking
component: db

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Rename `db.client.connections.usage` to `db.client.connections.count`.
note: >
Rename `db.client.connections.*` namespace to `db.client.connection.*` and
rename `db.client.connection.usage` to `db.client.connection.count`.
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
# The values here must be integers.
Expand Down
13 changes: 0 additions & 13 deletions model/metrics/database-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,3 @@ groups:
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: metric.db.client.connections.usage
type: metric
metric_name: db.client.connections.usage
stability: experimental
brief: "Deprecated, use `db.client.connections.count` instead."
instrument: updowncounter
unit: "{connection}"
attributes:
- ref: db.client.connections.state
requirement_level: required
- ref: db.client.connections.pool.name
requirement_level: required
110 changes: 110 additions & 0 deletions model/metrics/deprecated/database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
groups:
- id: db.client.deprecated.client.connections.usage
type: metric
metric_name: db.client.connections.usage
stability: experimental
deprecated: "Replaced by `db.client.connection.count`."
brief: "Deprecated, use `db.client.connection.count` instead."
instrument: updowncounter
unit: "{connection}"
attributes:
- ref: db.client.connections.state
requirement_level: required
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.idle.max
type: metric
metric_name: db.client.connections.idle.max
stability: experimental
deprecated: "Replaced by `db.client.connection.idle.max`."
brief: "Deprecated, use `db.client.connection.idle.max` instead."
instrument: updowncounter
unit: "{connection}"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.idle.min
type: metric
metric_name: db.client.connections.idle.min
stability: experimental
deprecated: "Replaced by `db.client.connection.idle.min`."
brief: "Deprecated, use `db.client.connection.idle.min` instead."
instrument: updowncounter
unit: "{connection}"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.max
type: metric
metric_name: db.client.connections.max
stability: experimental
deprecated: "Replaced by `db.client.connection.max`."
brief: "Deprecated, use `db.client.connection.max` instead."
instrument: updowncounter
unit: "{connection}"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.pending_requests
type: metric
metric_name: db.client.connections.pending_requests
stability: experimental
deprecated: "Replaced by `db.client.connection.pending_requests`."
brief: "Deprecated, use `db.client.connection.pending_requests` instead."
instrument: updowncounter
unit: "{request}"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.timeouts
type: metric
metric_name: db.client.connections.timeouts
stability: experimental
deprecated: "Replaced by `db.client.connection.timeouts`."
brief: "Deprecated, use `db.client.connection.timeouts` instead."
instrument: counter
unit: "{timeout}"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.create_time
type: metric
metric_name: db.client.connections.create_time
stability: experimental
deprecated: "Replaced by `db.client.connection.create_time`."
brief: "Deprecated, use `db.client.connection.create_time` instead."
instrument: histogram
unit: "ms"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.wait_time
type: metric
metric_name: db.client.connections.wait_time
stability: experimental
deprecated: "Replaced by `db.client.connection.wait_time`."
brief: "Deprecated, use `db.client.connection.wait_time` instead."
instrument: histogram
unit: "ms"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required

- id: db.client.deprecated.client.connections.use_time
type: metric
metric_name: db.client.connections.use_time
stability: experimental
deprecated: "Replaced by `db.client.connection.use_time`."
brief: "Deprecated, use `db.client.connection.use_time` instead."
instrument: histogram
unit: "ms"
attributes:
- ref: db.client.connections.pool.name
requirement_level: required
10 changes: 9 additions & 1 deletion schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@ versions:
changes:
# https://github.com/open-telemetry/semantic-conventions/pull/966
- rename_metrics:
db.client.connections.usage: db.client.connections.count
db.client.connections.usage: db.client.connection.count
db.client.connections.idle.max: db.client.connection.idle.max
db.client.connections.idle.min: db.client.connection.idle.min
db.client.connections.max: db.client.connection.max
db.client.connections.pending_requests: db.client.connection.pending_requests
db.client.connections.timeouts: db.client.connection.timeouts
db.client.connections.create_time: db.client.connection.create_time
db.client.connections.wait_time: db.client.connection.wait_time
db.client.connections.use_time: db.client.connection.use_time
# https://github.com/open-telemetry/semantic-conventions/pull/909
- rename_attributes:
attribute_map:
Expand Down

0 comments on commit 8862118

Please sign in to comment.