otel

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package otel adapts content-free Coding events to OpenTelemetry traces and metrics. Applications own SDK, exporter, processing, and provider shutdown.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TracerProvider trace.TracerProvider
	MeterProvider  metric.MeterProvider
}

Config supplies providers owned by the application. Nil providers use the OpenTelemetry global providers.

type Observer

type Observer struct {
	// contains filtered or unexported fields
}

Observer maps product lifecycle telemetry into OTel. It owns no exporter, provider, goroutine, or cross-event state and is safe to share across multiple Coding runtimes.

func New

func New(config Config) (*Observer, error)

New constructs an observer using application-owned or global providers.

func (*Observer) Observe

func (o *Observer) Observe(ctx context.Context, event coding.TelemetryEvent) error

Observe translates one content-free product event. Calls are synchronous; applications should use an OTel batch processor when export may block.

Jump to

Keyboard shortcuts

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