Documentation
¶
Overview ¶
Package otel provides thin OpenTelemetry helpers for Loom gRPC servers and clients.
The package intentionally wraps the official OpenTelemetry contrib gRPC instrumentation rather than implementing tracing itself. Applications remain responsible for configuring the tracer provider, exporter, and resource attributes; Loom owns the transport seam so generated and hand-written gRPC services can share one instrumentation path.
Use ServerOption and ClientOption with grpc.NewServer and grpc.NewClient (or grpc.Dial):
server := grpc.NewServer(otel.ServerOption()) conn, err := grpc.NewClient(target, otel.ClientOption())
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientOption ¶
func ClientOption(opts ...Option) grpc.DialOption
ClientOption returns a gRPC dial option that installs OpenTelemetry stats handling on the client.
func NewClientHandler ¶
NewClientHandler creates an OpenTelemetry gRPC client stats handler.
func NewServerHandler ¶
NewServerHandler creates an OpenTelemetry gRPC server stats handler.
func ServerOption ¶
func ServerOption(opts ...Option) grpc.ServerOption
ServerOption returns a grpc.ServerOption that installs OpenTelemetry stats handling on the server.