nonrecording.go

 1// Copyright The OpenTelemetry Authors
 2// SPDX-License-Identifier: Apache-2.0
 3
 4package trace // import "go.opentelemetry.io/otel/trace"
 5
 6// nonRecordingSpan is a minimal implementation of a Span that wraps a
 7// SpanContext. It performs no operations other than to return the wrapped
 8// SpanContext.
 9type nonRecordingSpan struct {
10	noopSpan
11
12	sc SpanContext
13}
14
15// SpanContext returns the wrapped SpanContext.
16func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }