-
Notifications
You must be signed in to change notification settings - Fork 167
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
base: main
Are you sure you want to change the base?
Cosmos DB: Operation Level Metrics #1438
Conversation
8106332
to
0e22c02
Compare
9fd4001
to
229b496
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add markdown for the metrics.
You need to add codegen placeholders like
and metrics will be generated between them.
Please take a look at the existing database metric definitions in https://github.com/open-telemetry/semantic-conventions/blob/v1.27.0/docs/database/database-metrics.md?plain=1 for the examples.
Note that a couple of properties are not yet defined in yaml, but need to be specified in markdown:
- metric requirement level - https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/metric-requirement-level.md
- histogram boundaries - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument-advisory-parameter-explicitbucketboundaries
Please also document whether cosmos reports any of the standard DB metrics (I assume it does report db.client.operation.duration
). If so, please document any difference from the generic metric. E.g. like it's done here - https://github.com/open-telemetry/semantic-conventions/blob/main/docs/dotnet/dotnet-http-metrics.md#metric-httpserverrequestduration
c0bd5ed
to
0e65012
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few nits, but looks good overall
5db7514
to
01dc811
Compare
1a632ac
to
ee1d400
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few minor final comments, but it looks good otherwise!
e311a60
to
bff773c
Compare
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Liudmila Molkova <[email protected]>
Co-authored-by: Justine Cocchi <[email protected]>
Co-authored-by: Justine Cocchi <[email protected]>
Co-authored-by: Justine Cocchi <[email protected]>
Co-authored-by: Justine Cocchi <[email protected]>
Co-authored-by: Justine Cocchi <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Introducing operation-level metrics in the .NET Cosmos DB SDK.
This PR includes the registration of semantic conventions in the OpenTelemetry community, ensuring full alignment with OpenTelemetry's established guidelines.
Dimensions
db.cosmosdb.operation_typebatch
;create
;delete
db.cosmos.client_idGuiddb.cosmosdb.machine_idUnique Id for a machine(Dependent of otel generated machine details)Metrics
{request_units}
[ExplicitBucketBoundaries] of [ 1, 5, 10, 25, 50, 100, 250, 500, 1000]
s
[ExplicitBucketBoundaries] of [0.001, 0.005, 0.010, 0.050, 0.100, 0.200, 0.500, 1.000, 2.000, 5.000]
db.query.limit{count}
For feed operations (query, readAll, readMany, change feed) and batch operations, this meter capture the requested maxItemCount per page/request. This metric SHOULD be specified with[ExplicitBucketBoundaries] of [50, 100, 250, 500, 1000, 2000, 5000]
{count}
[ExplicitBucketBoundaries] of [10, 50, 100, 250, 500, 1000, 2000, 5000, 10000]
.db.cosmosdb.operation.regions_contacted{count}
Number of regions contacted when executing an operation. This metric SHOULD be specified with[ExplicitBucketBoundaries] of [1, 2, 3, 5, 10, 20, 50]
.{count}
Added
db.cosmosdb.consistency_level
in attribute list also, we are going to collect it is traces alsoRemoved
db.cosmosdb.operation_type
Addeddb.cosmosdb.machine_id
in attribute list also, we are going to collect it is traces alsoMerge requirement checklist
[chore]