Skip to main content
Mastra v1 is coming in January 2026. Get ahead by starting new projects with the beta or upgrade your existing project today.

ArizeExporter

Sends AI tracing data to Arize Phoenix, Arize AX, or any OpenTelemetry-compatible observability platform that supports OpenInference semantic conventions.

ConstructorDirect link to Constructor

new ArizeExporter(config: ArizeExporterConfig)

ArizeExporterConfigDirect link to ArizeExporterConfig

interface ArizeExporterConfig {
// Phoenix / OpenTelemetry configuration
endpoint?: string;
apiKey?: string;

// Arize AX configuration
spaceId?: string;

// Common configuration
projectName?: string;
headers?: Record<string, string>;

// Inherited from OtelExporterConfig
timeout?: number;
batchSize?: number;
logLevel?: "debug" | "info" | "warn" | "error";
resourceAttributes?: Record<string, any>;
}

MethodsDirect link to Methods

exportEventDirect link to exportEvent

async exportEvent(event: AITracingEvent): Promise<void>

Exports a tracing event to the configured endpoint.

exportDirect link to export

async export(spans: ReadOnlyAISpan[]): Promise<void>

Batch exports spans using OpenTelemetry with OpenInference semantic conventions.

shutdownDirect link to shutdown

async shutdown(): Promise<void>

Flushes pending data and shuts down the client.

UsageDirect link to Usage

Phoenix ConfigurationDirect link to Phoenix Configuration

import { ArizeExporter } from "@mastra/arize";

const exporter = new ArizeExporter({
endpoint: "http://localhost:6006/v1/traces",
apiKey: process.env.PHOENIX_API_KEY, // Optional for local Phoenix
projectName: "my-ai-project",
});

Arize AX ConfigurationDirect link to Arize AX Configuration

import { ArizeExporter } from "@mastra/arize";

const exporter = new ArizeExporter({
spaceId: process.env.ARIZE_SPACE_ID!,
apiKey: process.env.ARIZE_API_KEY!,
projectName: "my-ai-project",
});

OpenInference Semantic ConventionsDirect link to OpenInference Semantic Conventions

The ArizeExporter implements OpenInference Semantic Conventions for generative AI applications, providing standardized trace structure across different observability platforms.