OptionalapiKey?: stringThe API key for authenticating with the Phoenix instance. If not provided, the system will check the PHOENIX_API_KEY environment variable.
The API key will be automatically added to the Authorization header as a Bearer token.
Optionalbatch?: booleanWhether to use batching for span processing.
true (default): Uses OpenInferenceBatchSpanProcessor for better performance in productionfalse: Uses OpenInferenceSimpleSpanProcessor for immediate span export (useful for debugging)Batching is recommended for production environments as it reduces network overhead and improves performance by sending multiple spans in a single request.
OptionaldiagLogLevel?: DiagLogLevelThe diagnostic log level for the built-in DiagConsoleLogger.
This controls the verbosity of OpenTelemetry's internal logging. Omit this parameter to disable built-in logging entirely.
Optionalglobal?: booleanWhether to register the tracer provider as the global provider.
When true (default), the provider will be registered globally and can be
accessed throughout the application. Set to false if you want to manage
the provider lifecycle manually or use multiple providers.
Optionalheaders?: HeadersAdditional headers to be included when communicating with the OTLP collector. These headers will be merged with any automatically generated headers (like Authorization).
Optionalinstrumentations?: Instrumentation[]A list of OpenTelemetry instrumentations to automatically register.
Note: This feature may only work with CommonJS projects. ESM projects may require manual instrumentation registration.
OptionalprojectName?: stringThe project name that spans will be associated with in Phoenix. This helps organize and filter traces in the Phoenix UI.
OptionalspanProcessors?: SpanProcessor[]Custom span processors to add to the tracer provider.
Important: When provided, this will override the default span processor
created from the url, apiKey, headers, and batch parameters.
Optionalurl?: stringThe URL to the Phoenix server. Can be postfixed with the tracing path. If not provided, the system will check the PHOENIX_COLLECTOR_URL environment variable.
The URL will be automatically normalized to include the /v1/traces endpoint if not present.
Configuration parameters for registering Phoenix OpenTelemetry tracing.
This interface defines all the available options for configuring the Phoenix OpenTelemetry integration, including connection details, processing options, and instrumentation settings.