Skip to content

Commit

Permalink
exclude propagation for now so we can test the algo
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Dec 4, 2024
1 parent 903dbab commit f8b9d4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ public SamplingResult shouldSample(
.getDecision();
if (SamplingDecision.RECORD_AND_SAMPLE.equals(parentDecision)) {
// todo: fix propagation
// DynamicSampler.setSampled(traceId);
// DynamicSampler.setSampled(traceId);
}

// always return true - because a child span might be sampled even if the parent is not
// todo: fix propagation
// return SamplingResult.recordOnly();
// return SamplingResult.recordOnly();
return SamplingResult.recordAndSample();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.grafana.extensions.servertiming;

import com.grafana.extensions.sampler.DynamicSampler;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.SpanContext;
import io.opentelemetry.api.trace.TraceFlags;
Expand Down Expand Up @@ -40,7 +39,7 @@ public <RESPONSE> void customize(
static String toHeaderValue(Context context) {
ReadWriteSpan span = (ReadWriteSpan) Span.fromContext(context);
SpanContext spanContext = span.getSpanContext();
// boolean sampled = DynamicSampler.evaluateSampled(span);
// boolean sampled = DynamicSampler.evaluateSampled(span);
// todo: fix propagation
boolean sampled = false;
TraceParentHolder traceParentHolder = new TraceParentHolder();
Expand Down

0 comments on commit f8b9d4d

Please sign in to comment.