OptionalapiThe 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.
OptionalbatchWhether 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.
OptionaldiagThe 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.
OptionalglobalWhether 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.
OptionalheadersAdditional headers to be included when communicating with the OTLP collector. These headers will be merged with any automatically generated headers (like Authorization).
OptionalinstrumentationsA list of OpenTelemetry instrumentations to automatically register.
Note: This feature may only work with CommonJS projects. ESM projects may require manual instrumentation registration.
OptionalprojectThe project name that spans will be associated with in Phoenix. This helps organize and filter traces in the Phoenix UI.
OptionalspanCustom 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.
OptionalurlThe 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.
Example