Class CosmosClientTelemetryOptions
Telemetry Options for Cosmos Client to enable/disable telemetry and distributed tracing along with corresponding threshold values.
public class CosmosClientTelemetryOptions
- Inheritance
-
CosmosClientTelemetryOptions
- Inherited Members
- Extension Methods
Constructors
CosmosClientTelemetryOptions()
public CosmosClientTelemetryOptions()
Properties
CosmosThresholdOptions
Threshold values for Distributed Tracing. These values decides whether to generate an EventSource with request diagnostics or not.
public CosmosThresholdOptions CosmosThresholdOptions { get; set; }
Property Value
DisableDistributedTracing
This method enable/disable generation of operation level Activity if listener is subscribed to the Source Name "Azure.Cosmos.Operation"(to capture operation level traces) and "Azure-Cosmos-Operation-Request-Diagnostics"(to capture events with request diagnostics JSON)
public bool DisableDistributedTracing { get; set; }
Property Value
- bool
false
Remarks
You can set different thresholds values by setting CosmosThresholdOptions.
It would generate events with Request Diagnostics JSON, if any of the configured threshold is crossed, otherwise it would always generate events with Request Diagnostics JSON for failed requests.
There is some overhead of emitting the more detailed diagnostics - so recommendation is to choose these thresholds that reduce the noise level
and only emit detailed diagnostics when there is really business impact seen.
Refer to know more about open telemetry exporters available.
Refer to know more about this feature.
DisableSendingMetricsToService
Disable sending telemetry data to Microsoft, CosmosThresholdOptions is not applicable for this.
public bool DisableSendingMetricsToService { get; set; }
Property Value
- bool
true
Remarks
This feature has to be enabled at 2 places:
- Opt-in from portal to subscribe for this feature.
- Setting this property to false, to enable it for a particular client instance.