Documentation
¶
Overview ¶
Package client_tracing provides gRPC client middleware for distributed tracing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Provider is the tracer provider used to create tracers.
Provider tracing.TracerProvider
// Propagator is the text map propagator for context propagation.
Propagator tracing.Propagator
}
Config holds the configuration for the gRPC client tracing middleware.
func (Config) Middleware ¶
func (c Config) Middleware() request.Middleware
Middleware returns a gRPC client middleware that creates spans for outgoing RPC calls. It injects trace context into the request metadata, creates a client span, and records errors. If the provider is a no-op, it returns a pass-through middleware.
Click to show internal directories.
Click to hide internal directories.