Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmos DB: Operation Level Metrics #1438

Merged
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
3e8e101
wip
sourabh1007 Sep 30, 2024
d43b298
cosmosdb operation level metrics
sourabh1007 Sep 30, 2024
a323aec
Update model/database/metrics.yaml
sourabh1007 Sep 30, 2024
fd6c5da
Update model/database/metrics.yaml
sourabh1007 Sep 30, 2024
74078ea
Update model/database/metrics.yaml
sourabh1007 Sep 30, 2024
c1f2efa
Update model/database/metrics.yaml
sourabh1007 Sep 30, 2024
54ef995
Update model/database/metrics.yaml
sourabh1007 Sep 30, 2024
f71ebb7
added consistency level
sourabh1007 Sep 30, 2024
7678272
cosmosdb name change
sourabh1007 Sep 30, 2024
e324ded
wip
sourabh1007 Oct 1, 2024
8c5f65c
consistency level fix
sourabh1007 Oct 1, 2024
0dac6eb
updatred toc
sourabh1007 Oct 1, 2024
0547b5a
fix dimentions
sourabh1007 Oct 2, 2024
cc66b77
better metrics name
sourabh1007 Oct 2, 2024
fb44bc1
Update model/database/cosmosdb-metrics.yaml
sourabh1007 Oct 3, 2024
2535df1
Update model/database/cosmosdb-metrics.yaml
sourabh1007 Oct 3, 2024
dcf101b
Update model/database/registry.yaml
sourabh1007 Oct 3, 2024
70fb428
fix typos
sourabh1007 Oct 3, 2024
67d92ef
improved docuemnation
sourabh1007 Oct 3, 2024
ffbe797
fixed documenation
sourabh1007 Oct 3, 2024
891a62b
Update model/database/metrics.yaml
sourabh1007 Oct 7, 2024
f162565
addressed comments
sourabh1007 Oct 7, 2024
10ecde0
toc update
sourabh1007 Oct 7, 2024
e996837
fix merge rebase
sourabh1007 Oct 9, 2024
167618e
wip
sourabh1007 Oct 9, 2024
15fa6fb
removed query imit metrics
sourabh1007 Oct 10, 2024
fc03c7c
add cosmos.md
sourabh1007 Oct 10, 2024
dcb6f1d
removed operation type
sourabh1007 Oct 11, 2024
547d7c9
Update model/database/cosmosdb-metrics.yaml
sourabh1007 Oct 11, 2024
051561d
Update model/database/metrics.yaml
sourabh1007 Oct 11, 2024
790a9ee
revert unrelated files
sourabh1007 Oct 11, 2024
47d53b1
updated requrst charge url
sourabh1007 Oct 11, 2024
80ab66d
added consistency level link
sourabh1007 Oct 11, 2024
82dee70
deprecated operation_type
sourabh1007 Oct 11, 2024
4f441fa
Update model/database/registry.yaml
sourabh1007 Oct 11, 2024
f9a24b7
Update .chloggen/users_sourabhjain_otelcosmosmetrics.yaml
sourabh1007 Oct 11, 2024
1861264
Update .chloggen/users_sourabhjain_otelcosmosmetrics.yaml
sourabh1007 Oct 11, 2024
5e8b1b5
Update model/database/cosmosdb-metrics.yaml
sourabh1007 Oct 11, 2024
210222c
Update model/database/cosmosdb-metrics.yaml
sourabh1007 Oct 11, 2024
dbd8b8e
Update model/database/registry.yaml
sourabh1007 Oct 11, 2024
28a4f28
Update model/database/metrics.yaml
sourabh1007 Oct 11, 2024
25f0327
fix ebvrything
sourabh1007 Oct 11, 2024
35df1a7
updated docuemnattaion
sourabh1007 Oct 14, 2024
4c32638
Update model/database/registry.yaml
sourabh1007 Oct 14, 2024
1a0cb8f
Update model/database/registry.yaml
sourabh1007 Oct 14, 2024
cdcc6b4
Updated docs
sourabh1007 Oct 14, 2024
1e5da5a
fix lint review
sourabh1007 Oct 14, 2024
d27af0f
Update model/database/registry.yaml
sourabh1007 Oct 15, 2024
8c54e01
Update model/database/registry.yaml
sourabh1007 Oct 15, 2024
c8c2222
Update docs/database/database-metrics.md
sourabh1007 Oct 15, 2024
7272b9a
wip
sourabh1007 Oct 15, 2024
68f8444
improved doc
sourabh1007 Oct 15, 2024
dad7e47
bettre doc
sourabh1007 Oct 15, 2024
ed71a97
remove hstogram buckets
sourabh1007 Oct 15, 2024
04a4331
updated after conflict
sourabh1007 Oct 16, 2024
277bff8
Update model/database/spans.yaml
sourabh1007 Oct 16, 2024
7d2ba80
Update model/database/registry.yaml
sourabh1007 Oct 16, 2024
02a880b
Update model/database/metrics.yaml
sourabh1007 Oct 16, 2024
a800740
Update docs/database/database-metrics.md
sourabh1007 Oct 16, 2024
927a414
Update docs/database/cosmosdb.md
sourabh1007 Oct 16, 2024
cb2078a
updated histogram boundaried for row_count
sourabh1007 Oct 16, 2024
1ce3f28
updated doc
sourabh1007 Oct 16, 2024
b22d885
update database metrics
sourabh1007 Oct 16, 2024
d6482d3
updated docs
sourabh1007 Oct 16, 2024
df9563d
added eos
sourabh1007 Oct 16, 2024
4a0aec0
fix identation
sourabh1007 Oct 16, 2024
48dbde6
Update docs/attributes-registry/db.md
sourabh1007 Oct 16, 2024
3165fbc
Update docs/database/cosmosdb.md
sourabh1007 Oct 16, 2024
bf35cfd
Update docs/database/cosmosdb.md
sourabh1007 Oct 16, 2024
a1dbe89
Update docs/attributes-registry/db.md
sourabh1007 Oct 16, 2024
18fd7dc
Update docs/attributes-registry/db.md
sourabh1007 Oct 16, 2024
6b62a17
update text change
sourabh1007 Oct 16, 2024
974f77c
resolved merge conflicts
sourabh1007 Oct 18, 2024
182b8e9
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 18, 2024
cb1d45a
updated docs
sourabh1007 Oct 19, 2024
56690b4
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 19, 2024
70b3a4a
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 22, 2024
89b3b55
updateed docs
sourabh1007 Oct 22, 2024
b7244bb
Update model/database/registry.yaml
sourabh1007 Oct 22, 2024
80f5659
Update model/database/registry.yaml
sourabh1007 Oct 22, 2024
7db12e8
updated docs
sourabh1007 Oct 22, 2024
e614752
renamed metrics
sourabh1007 Oct 23, 2024
5f2e999
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 23, 2024
c09c398
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 24, 2024
d6c0f6a
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 25, 2024
4237355
Merge branch 'main' into users/sourabhjain/otelcosmosmetrics
sourabh1007 Oct 25, 2024
3f0efe3
fix row count metrics name
sourabh1007 Oct 25, 2024
8abd299
Merge branch 'users/sourabhjain/otelcosmosmetrics' of https://github.…
sourabh1007 Oct 25, 2024
11f1faa
updated row_count to retiurned_rows
sourabh1007 Oct 26, 2024
9a8cb9a
Update model/database/metrics.yaml
sourabh1007 Oct 27, 2024
1daad9c
update docs
sourabh1007 Oct 27, 2024
164d7e9
added returned_rows attribute
sourabh1007 Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .chloggen/users_sourabhjain_otelcosmosmetrics.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Use this changelog template to create an entry for release notes.
#
# If your change doesn't affect end users you should instead start
# your pull request title with [chore] or use the "Skip Changelog" label.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
component: db

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Added new common `db.client.response.row_count` database metric and several operation level metrics for Azure Cosmos DB."

# 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.
issues: [1438]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
52 changes: 32 additions & 20 deletions docs/attributes-registry/db.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This group defines the attributes used to describe telemetry in the context of d
| <a id="db-query-parameter" href="#db-query-parameter">`db.query.parameter.<key>`</a> | string | A query parameter used in `db.query.text`, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value. [5] | `someval`; `55` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-query-summary" href="#db-query-summary">`db.query.summary`</a> | string | Low cardinality representation of a database query text. [6] | `SELECT wuser_table`; `INSERT shipping_details SELECT orders`; `get user by id` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-query-text" href="#db-query-text">`db.query.text`</a> | string | The database query being executed. [7] | `SELECT * FROM wuser_table where username = ?`; `SET mykey ?` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-response-row-count" href="#db-response-row-count">`db.response.row_count`</a> | int | Number of rows returned by the operation. | `10`; `30`; `1000` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
sourabh1007 marked this conversation as resolved.
Show resolved Hide resolved
| <a id="db-response-status-code" href="#db-response-status-code">`db.response.status_code`</a> | string | Database response status code. [8] | `102`; `ORA-17002`; `08P01`; `404` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-system" href="#db-system">`db.system`</a> | string | The database management system (DBMS) product as identified by the client instrumentation. [9] | `other_sql`; `adabas`; `cache` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

Expand Down Expand Up @@ -193,37 +194,27 @@ This group defines attributes for Azure Cosmos DB.
|---|---|---|---|---|
| <a id="db-cosmosdb-client-id" href="#db-cosmosdb-client-id">`db.cosmosdb.client_id`</a> | string | Unique Cosmos client instance id. | `3ba4827d-4422-483f-b59f-85b74211c11d` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-connection-mode" href="#db-cosmosdb-connection-mode">`db.cosmosdb.connection_mode`</a> | string | Cosmos client connection mode. | `gateway`; `direct` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-operation-type" href="#db-cosmosdb-operation-type">`db.cosmosdb.operation_type`</a> | string | Cosmos DB Operation Type. | `batch`; `create`; `delete` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-request-charge" href="#db-cosmosdb-request-charge">`db.cosmosdb.request_charge`</a> | double | RU consumed for that operation | `46.18`; `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-request-content-length" href="#db-cosmosdb-request-content-length">`db.cosmosdb.request_content_length`</a> | int | Request payload size in bytes | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-consistency-level" href="#db-cosmosdb-consistency-level">`db.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) |
| <a id="db-cosmosdb-request-charge" href="#db-cosmosdb-request-charge">`db.cosmosdb.request_charge`</a> | double | Request units consumed for the operation. | `46.18`; `1.0` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-request-content-length" href="#db-cosmosdb-request-content-length">`db.cosmosdb.request_content_length`</a> | int | Request payload size in bytes. | | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| <a id="db-cosmosdb-sub-status-code" href="#db-cosmosdb-sub-status-code">`db.cosmosdb.sub_status_code`</a> | int | Cosmos DB sub status code. | `1000`; `1002` | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`db.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.

| Value | Description | Stability |
|---|---|---|
| `direct` | Direct connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gateway` | Gateway (HTTP) connections mode | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `gateway` | Gateway (HTTP) connection. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

`db.cosmosdb.operation_type` 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.
`db.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.

| Value | Description | Stability |
|---|---|---|
| `batch` | batch | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `create` | create | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `execute` | execute | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `execute_javascript` | execute_javascript | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `head` | head | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `head_feed` | head_feed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `invalid` | invalid | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `patch` | patch | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `query` | query | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `query_plan` | query_plan | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `read` | read | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `read_feed` | read_feed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `replace` | replace | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `upsert` | upsert | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `BoundedStaleness` | bounded_staleness | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `ConsistentPrefix` | consistent_prefix | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `Eventual` | eventual | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `Session` | session | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `Strong` | strong | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

## Elasticsearch Attributes

Expand All @@ -245,6 +236,7 @@ This group defines attributes for Elasticsearch.
| <a id="db-cassandra-table" href="#db-cassandra-table">`db.cassandra.table`</a> | string | Deprecated, use `db.collection.name` instead. | `mytable` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.collection.name`. |
| <a id="db-connection-string" href="#db-connection-string">`db.connection_string`</a> | string | Deprecated, use `server.address`, `server.port` attributes instead. | `Server=(localdb)\v11.0;Integrated Security=true;` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `server.address` and `server.port`. |
| <a id="db-cosmosdb-container" href="#db-cosmosdb-container">`db.cosmosdb.container`</a> | string | Deprecated, use `db.collection.name` instead. | `mytable` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.collection.name`. |
| <a id="db-cosmosdb-operation-type" href="#db-cosmosdb-operation-type">`db.cosmosdb.operation_type`</a> | string | Deprecated, no replacement at this time. | `batch`; `create`; `delete` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>No replacement at this time. |
| <a id="db-cosmosdb-status-code" href="#db-cosmosdb-status-code">`db.cosmosdb.status_code`</a> | int | Deprecated, use `db.response.status_code` instead. | `200`; `201` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.response.status_code`. |
| <a id="db-elasticsearch-cluster-name" href="#db-elasticsearch-cluster-name">`db.elasticsearch.cluster.name`</a> | string | Deprecated, use `db.namespace` instead. | `e9106fc68e3044f0b1475b04bf4ffd5f` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.namespace`. |
| <a id="db-instance-id" href="#db-instance-id">`db.instance.id`</a> | string | Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. | `mysql-e26b99z.example.com` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Deprecated, no general replacement at this time. For Elasticsearch, use `db.elasticsearch.node.name` instead. |
Expand All @@ -258,6 +250,26 @@ This group defines attributes for Elasticsearch.
| <a id="db-statement" href="#db-statement">`db.statement`</a> | string | The database statement being executed. | `SELECT * FROM wuser_table`; `SET mykey "WuValue"` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>Replaced by `db.query.text`. |
| <a id="db-user" href="#db-user">`db.user`</a> | string | Deprecated, no replacement at this time. | `readonly_user`; `reporting_user` | ![Deprecated](https://img.shields.io/badge/-deprecated-red)<br>No replacement at this time. |

`db.cosmosdb.operation_type` 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.

| Value | Description | Stability |
|---|---|---|
| `batch` | batch | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `create` | create | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `delete` | delete | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `execute` | execute | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `execute_javascript` | execute_javascript | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `head` | head | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `head_feed` | head_feed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `invalid` | invalid | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `patch` | patch | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `query` | query | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `query_plan` | query_plan | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `read` | read | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `read_feed` | read_feed | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `replace` | replace | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
| `upsert` | upsert | ![Experimental](https://img.shields.io/badge/-experimental-blue) |

## Deprecated Database Metrics

"Describes deprecated db metrics attributes."
Expand Down
Loading
Loading