Skip to content

Commit

Permalink
[Internal] Open Telemetry : Fixes preview pipeline test for open tele…
Browse files Browse the repository at this point in the history
…metry (#5005)

## Description

As part of this PR, fixing test pipeline.

**Root Cause:** Metrics generation tests were designed to validate only
metrics functionality with dimensions. However, with distributed tracing
enabled by default in the preview package, the test began asserting
traces generated by the distributed tracing feature.
**Resolution:** Disabled the distributed tracing feature in tests to
ensure compatibility.

## Type of change

- [] Bug fix (non-breaking change which fixes an issue)
  • Loading branch information
sourabh1007 authored Feb 9, 2025
1 parent 42f1a57 commit 9b31c07
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public async Task MetricsGenerationTest(string stabilityMode, ConnectionMode con
{
await base.TestInit((builder) => builder.WithClientTelemetryOptions(new CosmosClientTelemetryOptions()
{
DisableDistributedTracing = true,
IsClientMetricsEnabled = true
})
.WithConnectionModeDirect());
Expand All @@ -104,6 +105,7 @@ await base.TestInit((builder) => builder.WithClientTelemetryOptions(new CosmosCl
{
await base.TestInit((builder) => builder.WithClientTelemetryOptions(new CosmosClientTelemetryOptions()
{
DisableDistributedTracing = true,
IsClientMetricsEnabled = true
})
.WithConnectionModeGateway());
Expand Down Expand Up @@ -167,6 +169,7 @@ public async Task MetricsWithOptionalDimensionTest(bool? shouldIncludeOptionalDi

await base.TestInit((builder) => builder.WithClientTelemetryOptions(new CosmosClientTelemetryOptions()
{
DisableDistributedTracing = true,
IsClientMetricsEnabled = true,
OperationMetricsOptions = new OperationMetricsOptions()
{
Expand Down

0 comments on commit 9b31c07

Please sign in to comment.