Documentation
¶
Overview ¶
Package tracing defines the tracing interfaces used by the mcp-go client and server. Concrete implementations live in adapter modules; an OpenTelemetry adapter ships at github.com/mark3labs/mcp-go/otel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Attribute ¶
type Attribute struct {
Key, Value string
}
Attribute is a string key/value pair attached to a span.
type Propagator ¶
type Propagator interface {
Inject(ctx context.Context, headers http.Header)
Extract(ctx context.Context, headers http.Header) context.Context
}
Propagator carries tracing context across HTTP requests.
func NoopPropagator ¶
func NoopPropagator() Propagator
NoopPropagator returns a Propagator whose methods are no-ops.
type Span ¶
type Span interface {
SetAttributes(attrs ...Attribute)
RecordError(err error)
SetStatus(code StatusCode, description string)
End()
}
Span is an in-flight tracing span. End must be called exactly once.
func SpanFromContext ¶
SpanFromContext returns the active Span, or a non-recording noop if none is present.
type StatusCode ¶
type StatusCode int
StatusCode describes the final outcome status of a span.
const ( StatusUnset StatusCode = iota StatusOK StatusError )
Click to show internal directories.
Click to hide internal directories.