Get started ​
@anvia/otel emits Anvia runs through infrastructure your application already owns. Configure an OpenTelemetry SDK before attaching the observer.
bash
pnpm add @anvia/core @anvia/otel @opentelemetry/api @opentelemetry/api-logsts
import { AgentBuilder } from '@anvia/core'
import { otel } from '@anvia/otel'
const tracing = otel.create({
serviceName: 'support-api',
captureMode: 'safe',
})
const agent = new AgentBuilder('support', model)
.observe(tracing)
.build()otel.create() uses an explicitly supplied Tracer or the active global tracer provider. It does not initialize exporters, register global providers, flush processors, or shut them down.
Use an OpenTelemetry Node SDK, a platform integration, or another runtime-specific provider in the application entrypoint. Initialize it before constructing or invoking agents.