2020-03-23 22:41:10 -07:00
|
|
|
// Copyright The OpenTelemetry Authors
|
2024-02-29 07:05:28 +01:00
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-03-23 22:41:10 -07:00
|
|
|
|
2021-03-29 15:55:44 +00:00
|
|
|
package trace // import "go.opentelemetry.io/otel/trace"
|
2020-02-04 17:55:03 +01:00
|
|
|
|
2021-03-29 15:55:44 +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
|
2020-02-04 17:55:03 +01:00
|
|
|
|
2021-03-29 15:55:44 +00:00
|
|
|
sc SpanContext
|
2020-02-04 17:55:03 +01:00
|
|
|
}
|
2021-03-29 15:55:44 +00:00
|
|
|
|
|
|
|
// SpanContext returns the wrapped SpanContext.
|
|
|
|
func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc }
|