Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-update-reference-docs-34.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

createOtelExtension

createOtelExtension(opts?): (pi: PiExtensionApi) => void Creates a pi coding agent extension that emits OTEL spans for the full agent lifecycle, conforming to the GenAI semantic conventions. When weave.init(...) has been called, spans are automatically exported to the Weave trace server at /agents/otel/v1/traces. Otherwise, pass a custom tracer in opts.

Parameters

NameType
optsOtelExtensionOptions

Returns

fn ▸ (pi): void
Parameters
NameType
piPiExtensionApi
Returns
void Example
const resourceLoader = new DefaultResourceLoader({
  extensionFactories: [createOtelExtension()],
});

Defined in

integrations/piCodingAgent.ts:629