-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Preview] AI Integration: Adds latency based filters to add request d…
…iagnostics in Activity and some minor changes (#3362) * add open telemetry config * add documentation * add documentation * add test * fixed imports * rebased contract changes * rename config to options * changes same as java * add new contract * add exception and tests * remove enable telemetry API and add 2 different with threshold for CRUD and query * update contract * check for scope enabled or not before recroding any attribute * add null check * null check for non supported operations * other minor changes * fix tests * dispose listener * remve console log * enable this feature by default for GA package open telemetry don't even exist * open telemetry config * test fix * test fix * add request options * ädd nullcheck * updated contact * rIsDistributedTracingEnabledename variable and add more verbose * rename apis * update contract * update request options and contract * new generated xml * added Distributed Tracing option with Latency Threshold and code refactor to load client properties during initialization of recorder * fix test * update contract * cosmetic changes * preview contract changes * wip * update coontract * minor cosmetic changes * remove publically exposed APIs * fix tests Co-authored-by: Sourabh Jain <sourabhjain@microsoft.com>
- Loading branch information
1 parent
3eeb80a
commit 875109d
Showing
39 changed files
with
1,205 additions
and
449 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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
33 changes: 33 additions & 0 deletions
33
Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs
This file contains 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,33 @@ | ||
// ------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// ------------------------------------------------------------ | ||
|
||
namespace Microsoft.Azure.Cosmos | ||
{ | ||
using System; | ||
using System.Runtime.CompilerServices; | ||
|
||
/// <summary> | ||
/// Open Telemetry Configuration | ||
/// It needs to be public once AppInsight is ready | ||
/// </summary> | ||
internal sealed class DistributedTracingOptions | ||
{ | ||
/// <summary> | ||
/// Default Latency threshold for other than query Operation | ||
/// </summary> | ||
internal static readonly TimeSpan DefaultCrudLatencyThreshold = TimeSpan.FromMilliseconds(100); | ||
|
||
/// <summary> | ||
/// Default Latency threshold for QUERY operation | ||
/// </summary> | ||
internal static readonly TimeSpan DefaultQueryTimeoutThreshold = TimeSpan.FromMilliseconds(500); | ||
|
||
/// <summary> | ||
/// Latency Threshold to generate (<see cref="System.Diagnostics.Tracing.EventSource"/>) with Request diagnostics in distributing Tracing.<br></br> | ||
/// If it is not set then by default it will generate (<see cref="System.Diagnostics.Tracing.EventSource"/>) for query operation which are taking more than 500 ms and non-query operations taking more than 100 ms. | ||
/// </summary> | ||
public TimeSpan? DiagnosticsLatencyThreshold { get; set; } | ||
|
||
} | ||
} |
This file contains 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 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 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.