Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
createLLMTracePhoenixPlugin
✓ import { createLLMTracePhoenixPlugin } from 'llm-trace-phoenix-otlp';
✗ const createLLMTracePhoenixPlugin = require('llm-trace-phoenix-otlp');
Default export function, but named import is correct. CommonJS require() does not work as expected; use ESM import or destructure.
LLMTracePhoenixPluginConfig
✓ import type { LLMTracePhoenixPluginConfig } from 'llm-trace-phoenix-otlp';
✗ import { LLMTracePhoenixPluginConfig } from 'llm-trace-phoenix-otlp';
This is a TypeScript type, not a runtime value. Use `import type` to avoid emitting in JS.
setupLLMTrace
✓ import { setupLLMTrace } from 'llm-trace-phoenix-otlp';
✗ import setupLLMTrace from 'llm-trace-phoenix-otlp';
setupLLMTrace is a named export, not default. Using default import will result in undefined.
Shows how to create the plugin with configuration and register with OpenClaw or use standalone setup function.
import { createLLMTracePhoenixPlugin } from 'llm-trace-phoenix-otlp';
const plugin = createLLMTracePhoenixPlugin({
phoenixGrpcUrl: process.env.PHOENIX_GRPC_URL ?? 'http://localhost:4317',
projectName: process.env.PHOENIX_PROJECT_NAME ?? 'openclaw',
});
// Register with OpenClaw (if using OpenClaw Gateway)
// In openclaw.json:
// {
// "plugins": {
// "allow": ["llm-trace-phoenix-otlp"],
// "entries": {
// "llm-trace-phoenix-otlp": {
// "enabled": true,
// "config": {
// "phoenixGrpcUrl": "http://localhost:4317",
// "projectName": "my-project"
// }
// }
// }
// }
// }
// Or use standalone with setupLLMTrace:
import { setupLLMTrace } from 'llm-trace-phoenix-otlp';
setupLLMTrace({
phoenixGrpcUrl: 'http://localhost:4317',
projectName: 'my-app',
});
Errors
Common errors & fixes
Error: Cannot find module '@opentelemetry/exporter-trace-otlp-grpc'
Missing peer dependency @opentelemetry/exporter-trace-otlp-grpc.
fixInstall the missing dependency: npm install @opentelemetry/exporter-trace-otlp-grpc
TypeError: (0 , createLLMTracePhoenixPlugin) is not a function
Using CommonJS require() instead of ESM import.
fixUse import statement: import { createLLMTracePhoenixPlugin } from 'llm-trace-phoenix-otlp'; Property 'llm.token_count.total' does not exist on type 'SpanAttributes'
Trying to set non-standard attribute not defined in types.
fixUse the correct attribute names from package; or cast to any if necessary.
Audit
Dependencies
@opentelemetry/exporter-trace-otlp-grpcrequiredOTLP gRPC trace exporter for sending spans to Phoenix
@opentelemetry/resourcesrequiredResource creation for setting project name and other attributes
@opentelemetry/sdk-trace-baserequiredBasic trace SDK components like BatchSpanProcessor
@opentelemetry/apirequiredOpenTelemetry API for span creation and context propagation
@opentelemetry/semantic-conventionsrequiredSemantic convention constants for span attributes