Skip to content
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

Change default preview config setting #1580

Merged
merged 1 commit into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static Sampler getSampler(double samplingPercentage, Configuration config
AiSampler.BehaviorIfNoMatchingOverrides.USE_DEFAULT_SAMPLING_PERCENTAGE);
AiSampler parentSampledSampler = new AiSampler(samplingPercentage, samplingOverrides,
AiSampler.BehaviorIfNoMatchingOverrides.RECORD_AND_SAMPLE);
// ignoreRemoteParentNotSampled is sometimes needed
// ignoreRemoteParentNotSampled is currently needed
// because .NET SDK always propagates trace flags "00" (not sampled)
Sampler remoteParentNotSampled = config.preview.ignoreRemoteParentNotSampled ? rootSampler : Sampler.alwaysOff();
return Sampler.parentBasedBuilder(rootSampler)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public static class PreviewConfiguration {
// not sure if we'll be able to have different metric intervals in future OpenTelemetry metrics world,
// so safer to only allow single interval for now
public int metricIntervalSeconds = 60;
public boolean ignoreRemoteParentNotSampled;
// ignoreRemoteParentNotSampled is currently needed
// because .NET SDK always propagates trace flags "00" (not sampled)
public boolean ignoreRemoteParentNotSampled = true;
public LiveMetrics liveMetrics = new LiveMetrics();
}

Expand Down