Skip to content

Monitor ElevenLabs using OpenTelemetry

Shield360 uses OpenTelemetry Auto-Instrumentation to help you monitor LLM applications built using Audio and Speech models from ElevenLabs. This includes tracking performance, costs, voice inputs and settings, and how users interact with the application.

Auto-instrumentation means you don’t have to set up monitoring manually for different LLMs, frameworks, or databases. By simply adding Shield360 in your application, all the necessary monitoring configurations are automatically set up.

The integration is compatible with

  • ElevenLabs Python SDK client >= 1.4.0
  • ElevenLabs TypeScript SDK client (@elevenlabs/elevenlabs-js or elevenlabs) >= 1.0.0
SDKInstrumented methods
TypeScriptElevenLabsClient.textToSpeech.convert, .stream, .convertWithTimestamps
PythonTextToSpeechClient.convert and AsyncTextToSpeechClient.convert

TypeScript covers more TTS methods than Python. Python instruments .convert only (sync and async).

  • Install the ElevenLabs SDK yourself. Shield360 does not bundle it as a dependency.
  • For TypeScript, call shield360.init() before the ElevenLabs module is first loaded so OpenTelemetry can hook into the SDK at runtime.
import shield360 from "shield360";
shield360.init({ otlpEndpoint: "YOUR_OTEL_ENDPOINT" });
import { ElevenLabsClient } from "@elevenlabs/elevenlabs-js";
const client = new ElevenLabsClient({ apiKey: process.env.ELEVENLABS_API_KEY! });
const audio = await client.textToSpeech.convert("voice-id", {
text: "Hello",
modelId: "eleven_multilingual_v2", // also accepts model_id / model
});
OptionBehavior
captureMessageContentGates gen_ai.input.messages / gen_ai.output.messages on spans and in events
disableEventsSuppresses all inference events
disableMetricsGlobal - metrics instruments are not set up
disabledInstrumentors: ['elevenlabs']Disables this instrumentation
Install Shield360

Open your command line or terminal and run:

Terminal window
pip install shield360
Initialize Shield360 in your Application

Perfect for existing applications - no code modifications needed:

Terminal window
# Configure via CLI arguments
shield360-instrument \
--service-name my-ai-app \
--environment production \
--otlp-endpoint YOUR_OTEL_ENDPOINT \
python your_app.py

Replace: YOUR_OTEL_ENDPOINT with the URL of your OpenTelemetry backend, such as http://127.0.0.1:4318 if you are using Shield360 and a local OTel Collector.

To send metrics and traces to other Observability tools, refer to the supported destinations.

For more advanced configurations and application use cases, visit the SDK configuration reference or TypeScript SDK reference.