Arize Phoenix TS
    Preparing search index...

    The @opentelemetry/sdk-trace BatchSpanProcessor, which throws a descriptive TypeError when it is not given an { exporter } options object, such as the OpenTelemetry JS 2.x form new BatchSpanProcessor(exporter). It also warns once per variable when an OTEL_BSP_* variable is set and the matching option is left out, since OpenTelemetry JS 3 no longer reads them.

    Passing spanProcessors to register() replaces the default Phoenix exporter, so give the exporter its Phoenix URL and auth yourself.

    import {
    BatchSpanProcessor,
    ensureCollectorEndpoint,
    OTLPTraceExporter,
    register,
    } from "@arizeai/phoenix-otel";

    register({
    spanProcessors: [
    new BatchSpanProcessor({
    exporter: new OTLPTraceExporter({
    url: ensureCollectorEndpoint("http://localhost:6006"),
    headers: { authorization: `Bearer ${process.env.PHOENIX_API_KEY}` },
    }),
    scheduledDelayMillis: 1000,
    }),
    ],
    });

    Hierarchy

    • BatchSpanProcessor
      • BatchSpanProcessor
    Index
    • Forces to export all finished spans

      Returns Promise<void>

    • Called when a ReadableSpan is ended, if the span.isRecording() returns true.

      Parameters

      • span: ReadableSpan

        the Span that just ended.

      Returns void

    • Returns void

    • Called when a Span is started, if the span.isRecording() returns true.

      Parameters

      • _span: Span$1
      • _parentContext: Context

      Returns void

    • Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.

      Returns Promise<void>