You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Update SamplingParameters (#1749)
* Update SamplingParameters Remove HasRemoteParent fields from SamplingParameters. The HasRemoteParent field is a duplicate of the Remote field of the parent span context contained in the ParentContext. Change the `ParentContext` field from storing a `SpanContext` to a `context.Context` that holds the parent span. This is to conform with the OpenTelemetry specification and resolve #1727. * Update PR number
This commit is contained in:
@@ -1532,7 +1532,8 @@ func (s *stateSampler) ShouldSample(p SamplingParameters) SamplingResult {
|
||||
if strings.HasPrefix(p.Name, s.prefix) {
|
||||
decision = RecordAndSample
|
||||
}
|
||||
return SamplingResult{Decision: decision, Tracestate: s.f(p.ParentContext.TraceState())}
|
||||
ts := s.f(trace.SpanContextFromContext(p.ParentContext).TraceState())
|
||||
return SamplingResult{Decision: decision, Tracestate: ts}
|
||||
}
|
||||
|
||||
func (s stateSampler) Description() string {
|
||||
|
||||
Reference in New Issue
Block a user