peridot/vendor/go.opentelemetry.io/otel/trace/nonrecording.go

17 lines
476 B
Go
Raw Normal View History

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