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

POTEL 39 - Use RECORD_ONLY sampling decision if performance is disabled #3659

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Changes from 1 commit
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 @@ -70,9 +70,9 @@ public SamplingResult shouldSample(

private @NotNull SamplingResult handleRootOtelSpan(
final @NotNull String traceId, final @NotNull Context parentContext) {
if (!scopes.getOptions().isTraceSampling()) {
// TODO [POTEL] should this return RECORD_ONLY to allow tracing without performance
return SamplingResult.create(SamplingDecision.DROP);
if (!scopes.getOptions().isTracingEnabled()) {
System.out.println("not trace sampling -> RECORD_ONLY " + traceId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Console print can be removed

return SamplingResult.create(SamplingDecision.RECORD_ONLY);
}
@Nullable Baggage baggage = null;
@Nullable
Expand Down
Loading