summaryrefslogtreecommitdiff
path: root/vendor/go.opentelemetry.io/otel/trace/nonrecording.go
blob: c00221e7be9fa600e6b10108aeb5ec8c7fd25a3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package trace // import "go.opentelemetry.io/otel/trace"

// nonRecordingSpan is a minimal implementation of a Span that wraps a
// SpanContext. It performs no operations other than to return the wrapped
// SpanContext.
type nonRecordingSpan struct {
	noopSpan

	sc SpanContext
}

// SpanContext returns the wrapped SpanContext.
func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }