Skip to content

Commit 62d5a7c

Browse files
authored
Consistent naming: db.system to db.system.name, namespace constants, remove db from system-specific names (open-telemetry#1734)
1 parent 91bb59c commit 62d5a7c

39 files changed

+1255
-754
lines changed

.chloggen/1734.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
change_type: breaking
2+
3+
component: db
4+
5+
note: |
6+
Rename `db.system` to `db.system.name` and clean up its values.
7+
Rename `db.elasticsearch.*`, `db.cassandra.*`, `db.cosmosdb.*` attributes to `elasticsearch.*`, `cassandra.*`, and `azure.cosmosdb.*` respectively.
8+
Rename `db.client.cosmosdb.*` metrics to `azure.cosmosdb.client.*`.
9+
10+
issues: [1581, 608]
11+
12+
subtext:

.github/ISSUE_TEMPLATE/bug_report.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ body:
2828
- area:aws
2929
- area:azure
3030
- area:browser
31+
- area:cassandra
3132
- area:cicd
3233
- area:client
3334
- area:cloud
@@ -43,6 +44,7 @@ body:
4344
- area:disk
4445
- area:dns
4546
- area:dotnet
47+
- area:elasticsearch
4648
- area:error
4749
- area:exception
4850
- area:faas

.github/ISSUE_TEMPLATE/change_proposal.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ body:
2020
- area:aws
2121
- area:azure
2222
- area:browser
23+
- area:cassandra
2324
- area:cicd
2425
- area:client
2526
- area:cloud
@@ -35,6 +36,7 @@ body:
3536
- area:disk
3637
- area:dns
3738
- area:dotnet
39+
- area:elasticsearch
3840
- area:error
3941
- area:exception
4042
- area:faas

docs/attributes-registry/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ Currently, the following namespaces exist:
3838
- [AWS](aws.md)
3939
- [Azure](azure.md)
4040
- [Browser](browser.md)
41+
- [Cassandra](cassandra.md)
4142
- [CICD](cicd.md)
4243
- [Client](client.md)
4344
- [Cloud](cloud.md)
@@ -53,6 +54,7 @@ Currently, the following namespaces exist:
5354
- [Disk](disk.md)
5455
- [DNS](dns.md)
5556
- [Dotnet](dotnet.md)
57+
- [Elasticsearch](elasticsearch.md)
5658
- [Enduser](enduser.md)
5759
- [Error](error.md)
5860
- [Event](event.md)

docs/attributes-registry/aws.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## General AWS Attributes
1818

19-
This document defines generic attributes for AWS services.
19+
This section defines generic attributes for AWS services.
2020

2121
| Attribute | Type | Description | Examples | Stability |
2222
|---|---|---|---|---|

docs/attributes-registry/azure.md

+42-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,51 @@
66

77
# Azure
88

9-
## Azure SDK Attributes
9+
- [Azure Client Library Attributes](#azure-client-library-attributes)
10+
- [Azure Cosmos DB Attributes](#azure-cosmos-db-attributes)
1011

11-
This document defines generic attributes for Azure SDK.
12+
## Azure Client Library Attributes
13+
14+
This section defines generic attributes used by Azure Client Libraries.
1215

1316
| Attribute | Type | Description | Examples | Stability |
1417
|---|---|---|---|---|
1518
| <a id="az-namespace" href="#az-namespace">`az.namespace`</a> | string | [Azure Resource Provider Namespace](https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers) as recognized by the client. | `Microsoft.Storage`; `Microsoft.KeyVault`; `Microsoft.ServiceBus` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
1619
| <a id="az-service-request-id" href="#az-service-request-id">`az.service_request_id`</a> | string | The unique identifier of the service request. It's generated by the Azure service and returned with the response. | `00000000-0000-0000-0000-000000000000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
20+
| <a id="azure-client-id" href="#azure-client-id">`azure.client.id`</a> | string | The unique identifier of the client instance. | `3ba4827d-4422-483f-b59f-85b74211c11d`; `storage-client-1` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
21+
22+
## Azure Cosmos DB Attributes
23+
24+
This section defines attributes for Azure Cosmos DB.
25+
26+
| Attribute | Type | Description | Examples | Stability |
27+
|---|---|---|---|---|
28+
| <a id="azure-cosmosdb-connection-mode" href="#azure-cosmosdb-connection-mode">`azure.cosmosdb.connection.mode`</a> | string | Cosmos client connection mode. | `gateway`; `direct` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
29+
| <a id="azure-cosmosdb-consistency-level" href="#azure-cosmosdb-consistency-level">`azure.cosmosdb.consistency.level`</a> | string | Account or request [consistency level](https://learn.microsoft.com/azure/cosmos-db/consistency-levels). | `Eventual`; `ConsistentPrefix`; `BoundedStaleness`; `Strong`; `Session` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
30+
| <a id="azure-cosmosdb-operation-contacted-regions" href="#azure-cosmosdb-operation-contacted-regions">`azure.cosmosdb.operation.contacted_regions`</a> | string[] | List of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call. [1] | `["North Central US", "Australia East", "Australia Southeast"]` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
31+
| <a id="azure-cosmosdb-operation-request-charge" href="#azure-cosmosdb-operation-request-charge">`azure.cosmosdb.operation.request_charge`</a> | double | The number of request units consumed by the operation. | `46.18`; `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
32+
| <a id="azure-cosmosdb-request-body-size" href="#azure-cosmosdb-request-body-size">`azure.cosmosdb.request.body.size`</a> | int | Request payload size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
33+
| <a id="azure-cosmosdb-response-sub-status-code" href="#azure-cosmosdb-response-sub-status-code">`azure.cosmosdb.response.sub_status_code`</a> | int | Cosmos DB sub status code. | `1000`; `1002` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
34+
35+
**[1] `azure.cosmosdb.operation.contacted_regions`:** Region name matches the format of `displayName` in [Azure Location API](https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location)
36+
37+
---
38+
39+
`azure.cosmosdb.connection.mode` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
40+
41+
| Value | Description | Stability |
42+
|---|---|---|
43+
| `direct` | Direct connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
44+
| `gateway` | Gateway (HTTP) connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
45+
46+
---
47+
48+
`azure.cosmosdb.consistency.level` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
49+
50+
| Value | Description | Stability |
51+
|---|---|---|
52+
| `BoundedStaleness` | bounded_staleness | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
53+
| `ConsistentPrefix` | consistent_prefix | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
54+
| `Eventual` | eventual | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
55+
| `Session` | session | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
56+
| `Strong` | strong | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

docs/attributes-registry/cassandra.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!--- Hugo front matter used to generate the website version of this page:
2+
--->
3+
4+
<!-- NOTE: THIS FILE IS AUTOGENERATED. DO NOT EDIT BY HAND. -->
5+
<!-- see templates/registry/markdown/attribute_namespace.md.j2 -->
6+
7+
# Cassandra
8+
9+
## Cassandra Attributes
10+
11+
This section defines attributes for Cassandra.
12+
13+
| Attribute | Type | Description | Examples | Stability |
14+
|---|---|---|---|---|
15+
| <a id="cassandra-consistency-level" href="#cassandra-consistency-level">`cassandra.consistency.level`</a> | string | The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). | `all`; `each_quorum`; `quorum` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
16+
| <a id="cassandra-coordinator-dc" href="#cassandra-coordinator-dc">`cassandra.coordinator.dc`</a> | string | The data center of the coordinating node for a query. | `us-west-2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
17+
| <a id="cassandra-coordinator-id" href="#cassandra-coordinator-id">`cassandra.coordinator.id`</a> | string | The ID of the coordinating node for a query. | `be13faa2-8574-4d71-926d-27f16cf8a7af` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
18+
| <a id="cassandra-page-size" href="#cassandra-page-size">`cassandra.page.size`</a> | int | The fetch size used for paging, i.e. how many rows will be returned at once. | `5000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
19+
| <a id="cassandra-query-idempotent" href="#cassandra-query-idempotent">`cassandra.query.idempotent`</a> | boolean | Whether or not the query is idempotent. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
20+
| <a id="cassandra-speculative-execution-count" href="#cassandra-speculative-execution-count">`cassandra.speculative_execution.count`</a> | int | The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively. | `0`; `2` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
21+
22+
---
23+
24+
`cassandra.consistency.level` has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
25+
26+
| Value | Description | Stability |
27+
|---|---|---|
28+
| `all` | all | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
29+
| `any` | any | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
30+
| `each_quorum` | each_quorum | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
31+
| `local_one` | local_one | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
32+
| `local_quorum` | local_quorum | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
33+
| `local_serial` | local_serial | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
34+
| `one` | one | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
35+
| `quorum` | quorum | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
36+
| `serial` | serial | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
37+
| `three` | three | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
38+
| `two` | two | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

0 commit comments

Comments
 (0)