otel

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 3 Imported by: 0

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

func NewClientHandler(opts ...Option) stats.Handler

NewClientHandler creates an OpenTelemetry gRPC client stats handler.

func NewServerHandler

func NewServerHandler(opts ...Option) stats.Handler

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.

Types

type Option

type Option = otelgrpc.Option

Option configures gRPC OpenTelemetry instrumentation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL