-
Notifications
You must be signed in to change notification settings - Fork 524
Open Telemetry: Adds option to opt-in optional dimensions #4925
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 103 commits into
master
from
users/sourabhjain/tagcustomized
Dec 31, 2024
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
3d1d6ba
Added request level metrics
sourabh1007 60c411b
add IsClientMetricsEnabled option
sourabh1007 55b6505
added contract file
sourabh1007 6fb216c
wip
sourabh1007 841c7bc
adding test
sourabh1007 ee32e43
added documentation
sourabh1007 1ddbcbe
emit metrics
sourabh1007 7e9a344
fixed dimensions
sourabh1007 bc6f273
nonworking changes
sourabh1007 278c5c5
final commit
sourabh1007 8bae2a9
remove unnecessary dependencies
sourabh1007 cebace3
contract update
sourabh1007 6c32e52
fix merges
sourabh1007 f6974ea
remove console
sourabh1007 161abe9
add noops if disables
sourabh1007 2569ed9
added null check
sourabh1007 a3ee34d
[INTERNAL] CI: Fixes emulator set-up to leverage central SDK teams sc…
kirankumarkolli de96acc
VectorIndexDefinition: Adds Support for Partitioned DiskANN (#4792)
kundadebdatta 2af0b05
Azurecore: Fixes upgrading azure core dependency to latest (#4819)
kirankumarkolli 8d80c1c
DeleteAllItemsByPartitionKeyStreamAsync: Adds DeleteAllItemsByPartiti…
kirankumarkolli 316b3d8
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 c6a33b0
rename file
sourabh1007 4fd1193
refactor code
sourabh1007 033fda4
refactor code
sourabh1007 e92477a
perf tests
sourabh1007 cf5bb03
updated contracts
sourabh1007 6338908
code refactor
sourabh1007 321520c
refactored code
sourabh1007 51d485c
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 7d03b8f
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 1614b75
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 9081e1a
added region contacted as dimension
sourabh1007 66efcf9
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 ba63724
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 a451d49
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 736c292
perf fix
sourabh1007 6d6957b
inc perf test
sourabh1007 36d0ee1
perf results
sourabh1007 2509f3a
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 36079d4
refactor according to versioning
sourabh1007 b7ae941
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 d01a3c4
Merge branch 'master' into users/sourabhjain/otelmetriccpu
sourabh1007 e0efe5b
fix test
sourabh1007 369160b
refactor code
sourabh1007 1f64899
added try catch
sourabh1007 79b7307
added console
sourabh1007 f184813
updated contract
sourabh1007 ef2f2a5
code refatoring
sourabh1007 731951a
fix tetss
sourabh1007 a9eeba6
refactor code
sourabh1007 963824c
first drfat
sourabh1007 35c3141
updated
sourabh1007 eb289e5
fix test
sourabh1007 1280e13
updated sln
sourabh1007 675c49f
refactor code
sourabh1007 b4e2045
test fix
sourabh1007 3f30e87
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 e4a7459
cleanup
sourabh1007 164d615
compile fix
sourabh1007 b03d026
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 e618478
fix direct contract changes
sourabh1007 f576bc4
exception handling
sourabh1007 b4a0113
fix tets
sourabh1007 ff10923
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 8ed1645
refcator code
sourabh1007 852ebf9
updated contract
sourabh1007 b71a164
fix bug
sourabh1007 d10cab2
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 2c9dfcf
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 f3679bc
fix test
sourabh1007 5e00973
add logs
sourabh1007 3b7fcb7
fix bug
sourabh1007 100273b
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 22be226
update pipeline
sourabh1007 cf4951b
excption handling
sourabh1007 dc3f71a
fix tests
sourabh1007 f05a443
fix test
sourabh1007 66a30fc
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 e5c8e0d
review commenst
sourabh1007 56d53c7
Add metrics options
sourabh1007 b902b64
use custom dimensions
sourabh1007 65609f4
Merge branch 'master' into users/sourabhjain/otelnetworkmetrics
sourabh1007 f91c17b
fix conflicts
sourabh1007 83c0a5d
update contract
sourabh1007 563bfc2
Merge branch 'users/sourabhjain/otelnetworkmetrics' into users/sourab…
sourabh1007 9b6cf75
Merge branch 'master' into users/sourabhjain/tagcustomized
sourabh1007 cd26826
conflict resolved
sourabh1007 08d35bb
refactor code
sourabh1007 975666d
clean up
sourabh1007 d9209a5
updated doc
sourabh1007 0f4af52
contract changes
sourabh1007 5f9a0de
refactor code
sourabh1007 39ee183
fix test
sourabh1007 a4bc4ce
addded docs
sourabh1007 460399c
test fix for query
sourabh1007 c0d40c0
contract fix
sourabh1007 990a664
query iterator fox
sourabh1007 ba033b9
unused imports
sourabh1007 462c1fc
code refcator
sourabh1007 dceaae8
contract update
sourabh1007 2d80895
udated doc
sourabh1007 9cc46a0
Merge branch 'master' into users/sourabhjain/tagcustomized
sourabh1007 4c098e3
Merge branch 'master' into users/sourabhjain/tagcustomized
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| //------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| //------------------------------------------------------------ | ||
|
|
||
| namespace Microsoft.Azure.Cosmos | ||
| { | ||
| using System.Collections.Generic; | ||
|
|
||
| /// <summary> | ||
| /// Represents the configuration options for collecting metrics related to Cosmos DB network operations. | ||
| /// </summary> | ||
| public class NetworkMetricsOptions | ||
| { | ||
| /// <summary> | ||
| /// <para> | ||
| /// Gets or sets a value indicating whether the routing ID (e.g., PK Range ID for Gateway Mode or Partition/Replica information for Direct Mode, if available) | ||
| /// should be included in the network metrics. | ||
| /// </para> | ||
| /// By default, Routing Id information is not included as a dimension in the network metrics. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// <para> | ||
| /// Enabling this option provides greater diagnostic granularity, allowing you to identify issues | ||
| /// with specific Partition Key Range IDs, replicas, or partitions. | ||
| /// However, including the routing ID as a dimension increases the cardinality of metrics. This can result | ||
| /// in significantly higher storage costs and generate a large number of metrics with low sample counts, | ||
| /// making analysis more challenging. | ||
| /// </para> | ||
| /// <para> | ||
| /// Carefully evaluate whether the additional granularity is necessary | ||
| /// for your use case, as it may lead to increased resource consumption and complexity. | ||
| /// </para> | ||
| /// </remarks> | ||
| public bool? IncludeRoutingId { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets a collection of custom dimensions to include in the network metrics. Each dimension is defined as a key-value pair. | ||
| /// </summary> | ||
| /// <example> | ||
| /// <code language="c#"> | ||
| /// <![CDATA[ | ||
| /// var telemetryOptions = new NetworkMetricsOptions | ||
| /// { | ||
| /// CustomDimensions = new Dictionary<string, string> | ||
| /// { | ||
| /// { "Region", "EastUS" }, | ||
| /// } | ||
| /// }; | ||
| /// ]]> | ||
| /// </code> | ||
| /// </example> | ||
| public IDictionary<string, string> CustomDimensions { get; set; } | ||
| } | ||
|
|
||
| } | ||
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,53 @@ | ||
| //------------------------------------------------------------ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| //------------------------------------------------------------ | ||
|
|
||
| namespace Microsoft.Azure.Cosmos | ||
| { | ||
| using System.Collections.Generic; | ||
|
|
||
| /// <summary> | ||
| /// Represents the configuration options for collecting metrics related to Cosmos DB operations. | ||
| /// </summary> | ||
| public class OperationMetricsOptions | ||
| { | ||
| /// <summary> | ||
| /// <para> | ||
| /// Gets or sets a value indicating whether the region information should be included in the operation metrics. | ||
| /// </para> | ||
| /// By default, Region information is not included as a dimension in the operation metrics. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// <para> | ||
| /// Enabling this option provides greater diagnostic granularity, allowing you to identify issues | ||
| /// with specific Partition Key Range IDs, replicas, or partitions. | ||
| /// However, including the routing ID as a dimension increases the cardinality of metrics. This can result | ||
| /// in significantly higher storage costs and generate a large number of metrics with low sample counts, | ||
| /// making analysis more challenging. | ||
| /// </para> | ||
| /// <para> | ||
| /// Carefully evaluate whether the additional granularity is necessary | ||
| /// for your use case, as it may lead to increased resource consumption and complexity. | ||
| /// </para> | ||
| /// </remarks> | ||
| public bool? IncludeRegion { get; set; } | ||
sourabh1007 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /// <summary> | ||
| /// Gets or sets a collection of custom dimensions to include in the operation metrics. Each dimension is defined as a key-value pair. | ||
| /// </summary> | ||
| /// <example> | ||
| /// <code language="c#"> | ||
| /// <![CDATA[ | ||
| /// var telemetryOptions = new OperationMetricsOptions | ||
| /// { | ||
| /// CustomDimensions = new Dictionary<string, string> | ||
| /// { | ||
| /// { "Region", "EastUS" } | ||
| /// } | ||
| /// }; | ||
| /// ]]> | ||
| /// </code> | ||
| /// </example> | ||
| public IDictionary<string, string> CustomDimensions { get; set; } | ||
| } | ||
| } | ||
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
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
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.