otel

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package otel provides an OpenTelemetry trace handler for gollem.

It bridges gollem's trace events to OpenTelemetry spans, allowing integration with any OTel-compatible backend (Jaeger, Zipkin, OTLP, etc.).

Basic usage with global TracerProvider:

agent := gollem.New(client, gollem.WithTrace(otel.New()))

With explicit TracerProvider:

agent := gollem.New(client, gollem.WithTrace(
    otel.New(otel.WithTracerProvider(tp)),
))

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts ...Option) trace.Handler

New creates a new OTel trace handler. If no TracerProvider is specified via options, the global TracerProvider is used.

Types

type Option

type Option func(*handler)

Option is a functional option for configuring the OTel handler.

func WithTracerProvider

func WithTracerProvider(tp otelTrace.TracerProvider) Option

WithTracerProvider sets an explicit TracerProvider. If not set, the global TracerProvider is used.

Jump to

Keyboard shortcuts

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