-
Notifications
You must be signed in to change notification settings - Fork 524
Client Telemetry: Adds new public APIs #4056
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
Merged
microsoft-github-policy-service
merged 41 commits into
master
from
users/sourabhjain/clienttelemetrypubliccontract
Oct 4, 2023
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
f04234b
Revert "[Internal] Client Telemetry: Refactors code for collectors (#…
sourabh1007 3517f7e
Revert "Revert "[Internal] Client Telemetry: Refactors code for colle…
sourabh1007 2d2d3e5
Merge branch 'master' of https://github.com/Azure/azure-cosmos-dotnet-v3
sourabh1007 ddffd82
firdst draft
sourabh1007 2006633
initialize object
sourabh1007 26e4ca6
null handle
sourabh1007 fb3ae09
update contracts
sourabh1007 2dd1c05
compilation charges
sourabh1007 b1bdbeb
fix tests
sourabh1007 705d0c6
public API changes
sourabh1007 2893f91
add docs
sourabh1007 a280ecd
contract updated
sourabh1007 6df7c06
fixed tests
sourabh1007 c89d6fc
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 dd7d7ef
by default switch of te;emetry in sdk
sourabh1007 87b476e
fix tests
sourabh1007 00f820d
fix assertion
sourabh1007 d9fe539
incorporate review comments
sourabh1007 6454e82
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 950a755
fetaure flag fix in script
sourabh1007 ff65166
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 6366dc5
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 1743941
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 4ce519d
switch case
sourabh1007 f62190a
add test
sourabh1007 a1c767e
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 39def0d
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 0482009
fix tests
sourabh1007 7261e84
fix test
sourabh1007 9c5b41e
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 cb9a323
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 3a7709c
fixed run.sh
sourabh1007 47ddb21
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 ce810b5
minor changes
sourabh1007 7c13e55
code refactor
sourabh1007 47641e5
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 6f8d879
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 59b09bb
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 9b4ae81
changed default values and fix tests
sourabh1007 7915802
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 5b53364
Merge branch 'master' into users/sourabhjain/clienttelemetrypubliccon…
sourabh1007 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
Microsoft.Azure.Cosmos/src/CosmosClientTelemetryOptions.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| //------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| //------------------------------------------------------------ | ||
|
|
||
| namespace Microsoft.Azure.Cosmos | ||
| { | ||
| /// <summary> | ||
| /// Telemetry Options for Cosmos Client to enable/disable telemetry and distributed tracing along with corresponding threshold values. | ||
| /// </summary> | ||
| #if PREVIEW | ||
| public | ||
| #else | ||
| internal | ||
| #endif | ||
| class CosmosClientTelemetryOptions | ||
| { | ||
| /// <summary> | ||
| /// Disable sending telemetry to service, <see cref="Microsoft.Azure.Cosmos.CosmosThresholdOptions"/> is not applicable to this as of now. | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// </summary> | ||
| /// <remarks>This option will disable sending telemetry to service.even it is opt-in from portal.</remarks> | ||
| /// <value>true</value> | ||
| #if PREVIEW | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public | ||
| #else | ||
| internal | ||
| #endif | ||
| bool DisableSendingMetricsToService { get; set; } = true; | ||
ealsur marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /// <summary> | ||
| /// This method enable/disable generation of operation level <see cref="System.Diagnostics.Activity"/> if listener is subscribed to the Source Name "Azure.Cosmos.Operation". | ||
| /// </summary> | ||
| /// <value>false</value> | ||
| /// <remarks> Please Refer https://opentelemetry.io/docs/instrumentation/net/exporters/ to know more about open telemetry exporters</remarks> | ||
| #if PREVIEW | ||
| public | ||
| #else | ||
| internal | ||
| #endif | ||
| bool DisableDistributedTracing { get; set; } = | ||
| #if PREVIEW | ||
| false; | ||
| #else | ||
| true; | ||
| #endif | ||
|
|
||
| /// <summary> | ||
| /// Threshold values for Distributed Tracing. | ||
| /// These values decides whether to generate operation level <see cref="System.Diagnostics.Tracing.EventSource"/> with request diagnostics or not. | ||
| /// </summary> | ||
| #if PREVIEW | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public | ||
| #else | ||
| internal | ||
| #endif | ||
| CosmosThresholdOptions CosmosThresholdOptions { get; set; } = new CosmosThresholdOptions(); | ||
|
|
||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| //------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| //------------------------------------------------------------ | ||
|
|
||
| namespace Microsoft.Azure.Cosmos | ||
| { | ||
| using System; | ||
|
|
||
| /// <summary> | ||
| /// Threshold values for Distributed Tracing | ||
| /// </summary> | ||
| #if PREVIEW | ||
| public | ||
| #else | ||
| internal | ||
| #endif | ||
| class CosmosThresholdOptions | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| /// <summary> | ||
| /// Latency Threshold for non point operations i.e. Query | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /// </summary> | ||
| /// <value>500 ms</value> | ||
| public TimeSpan NonPointOperationLatencyThreshold { get; set; } = TimeSpan.FromSeconds(3); | ||
|
|
||
| /// <summary> | ||
| /// Latency Threshold for point operations i.e operation other than Query | ||
| /// </summary> | ||
| /// <value>100 ms</value> | ||
| public TimeSpan PointOperationLatencyThreshold { get; set; } = TimeSpan.FromSeconds(1); | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.