2024-02-24 00:34:55 +00:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-10-16 10:54:40 +00:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2022-07-07 20:11:50 +00:00
|
|
|
|
2024-02-24 00:34:55 +00:00
|
|
|
package trace // import "go.opentelemetry.io/otel/trace"
|
2022-07-07 20:11:50 +00:00
|
|
|
|
2024-02-24 00:34:55 +00:00
|
|
|
// 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
|
2022-07-07 20:11:50 +00:00
|
|
|
|
2024-02-24 00:34:55 +00:00
|
|
|
sc SpanContext
|
2022-07-07 20:11:50 +00:00
|
|
|
}
|
2024-02-24 00:34:55 +00:00
|
|
|
|
|
|
|
// SpanContext returns the wrapped SpanContext.
|
|
|
|
func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }
|