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

OpenTelemetry Metrics: Adds support to collect Operation level metrics #4682

Merged

Conversation

sourabh1007
Copy link
Contributor

@sourabh1007 sourabh1007 commented Sep 13, 2024

Description

  1. Added new flag in CosmosClientTelemetryOptions i.e. IsClientMetricsEnabled, to enable/disable metrics. By default, it would be disabled. (inspired from Java SDK https://github.com/Azure/azure-sdk-for-java/blob/5bc07ca75c7c0520c1098b5a6264258b6e043435/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/CosmosClientTelemetryConfig.java#L61)
  2. If enabled, collecting below metrics ref. Cosmos DB: Operation Level Metrics open-telemetry/semantic-conventions#1438

ref. Java Metric Doumentation, https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/cosmos/azure-cosmos/docs/Metrics.md
ref. Discussion with open telemetry community open-telemetry/semantic-conventions#1438

this PR has Contract Changes.

Perf Testing

I haven't observed any performance impact from this change. In this feature, any performance issues would likely stem from the Exporter implementation or the aggregation interval. The tests were conducted using a no-op exporter subscribed to these meters to isolate any performance impact specifically related to data recording

image

Type of change

  • [] New feature (non-breaking change which adds functionality)

@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch from c47f59b to 6fc4195 Compare September 13, 2024 02:55
@sourabh1007 sourabh1007 marked this pull request as draft September 13, 2024 03:02
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch 2 times, most recently from f4c3132 to 512f1ed Compare September 16, 2024 02:30
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch 4 times, most recently from 6e89d3a to fb81cfa Compare September 26, 2024 13:52
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch from c686b4d to 320e618 Compare September 30, 2024 05:37
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch 6 times, most recently from 803f71e to 3c1be6b Compare October 17, 2024 06:46
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch from 275f5db to ae206c9 Compare October 18, 2024 05:41
@sourabh1007 sourabh1007 marked this pull request as ready for review October 18, 2024 05:52
@sourabh1007 sourabh1007 requested a review from a team as a code owner October 18, 2024 05:52
@sourabh1007 sourabh1007 mentioned this pull request Nov 13, 2024
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch from ae5e2c3 to 6d6957b Compare November 14, 2024 15:32
@sourabh1007 sourabh1007 force-pushed the users/sourabhjain/otelmetriccpu branch from 6a98f46 to a9eeba6 Compare November 20, 2024 16:37
Copy link
Member

@kundadebdatta kundadebdatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks LGTM

@sourabh1007 sourabh1007 added the auto-merge Enables automation to merge PRs label Nov 23, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit 9fa85ee into master Nov 24, 2024
24 checks passed
@microsoft-github-policy-service microsoft-github-policy-service bot deleted the users/sourabhjain/otelmetriccpu branch November 24, 2024 00:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enables automation to merge PRs Telemetry
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants