nonrecording.go 476 B

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