Skip to content

Commit d598989

Browse files
authored
Change default preview config setting (#1580)
1 parent e0f3845 commit d598989

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/sampling/Samplers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static Sampler getSampler(double samplingPercentage, Configuration config
1111
AiSampler.BehaviorIfNoMatchingOverrides.USE_DEFAULT_SAMPLING_PERCENTAGE);
1212
AiSampler parentSampledSampler = new AiSampler(samplingPercentage, samplingOverrides,
1313
AiSampler.BehaviorIfNoMatchingOverrides.RECORD_AND_SAMPLE);
14-
// ignoreRemoteParentNotSampled is sometimes needed
14+
// ignoreRemoteParentNotSampled is currently needed
1515
// because .NET SDK always propagates trace flags "00" (not sampled)
1616
Sampler remoteParentNotSampled = config.preview.ignoreRemoteParentNotSampled ? rootSampler : Sampler.alwaysOff();
1717
return Sampler.parentBasedBuilder(rootSampler)

agent/agent-tooling/src/main/java/com/microsoft/applicationinsights/agent/internal/wasbootstrap/configuration/Configuration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ public static class PreviewConfiguration {
171171
// not sure if we'll be able to have different metric intervals in future OpenTelemetry metrics world,
172172
// so safer to only allow single interval for now
173173
public int metricIntervalSeconds = 60;
174-
public boolean ignoreRemoteParentNotSampled;
174+
// ignoreRemoteParentNotSampled is currently needed
175+
// because .NET SDK always propagates trace flags "00" (not sampled)
176+
public boolean ignoreRemoteParentNotSampled = true;
175177
public LiveMetrics liveMetrics = new LiveMetrics();
176178
}
177179

0 commit comments

Comments
 (0)