Note: This package is still under active development and is subject to change.
Installation
Quick Start
The simplest way to get started is to use theregister function with minimal configuration:
Configuration
Environment Variables
The package automatically reads from the following environment variables if configuration parameters are not provided:PHOENIX_COLLECTOR_ENDPOINT- The URL to the Phoenix collector endpointPHOENIX_API_KEY- The API key for authentication
Configuration Options
Theregister function accepts a RegisterParams object with the following options:
| Parameter | Type | Default | Description |
|---|---|---|---|
projectName | string | "default" | The project name that spans should be associated with |
url | string | "http://localhost:6006" | The URL to the Phoenix server (can include tracing path) |
apiKey | string | undefined | The API key for Phoenix instance authentication |
headers | Record<string, string> | {} | Custom headers to include in OTLP requests |
batch | boolean | true | Whether to use batch span processing (recommended for production) |
instrumentations | Instrumentation[] | undefined | Array of OpenTelemetry instrumentations to register |
global | boolean | true | Whether to set the tracer as a global provider |
diagLogLevel | DiagLogLevel | undefined | Diagnostic logging level for debugging |
Usage Examples
Basic Configuration
With Auto-Instrumentation
Automatically instrument common libraries (works best with CommonJS projects):Note: Auto-instrumentation may only work with CommonJS projects. ESM projects will require manually applying instrumentation.

