VoiceLiveInstrumentor Class
Manages OpenTelemetry trace instrumentation for VoiceLive.
This class enables or disables tracing for the VoiceLive SDK.
Instrumentation is opt-in and controlled via the
AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING environment variable,
which must be set to "true" for .instrument() to take effect.
Example usage:
from azure.ai.voicelive.telemetry import VoiceLiveInstrumentor
VoiceLiveInstrumentor().instrument()
Constructor
VoiceLiveInstrumentor()
Methods
| instrument |
Enable trace instrumentation for VoiceLive. Tracing is gated behind the |
| is_content_recording_enabled |
Check whether message content recording is enabled. |
| is_instrumented |
Check whether VoiceLive tracing is currently active. |
| uninstrument |
Remove trace instrumentation for VoiceLive. |
instrument
Enable trace instrumentation for VoiceLive.
Tracing is gated behind the AZURE_EXPERIMENTAL_ENABLE_GENAI_TRACING
environment variable. If it is not set to "true", this method is a no-op.
instrument(enable_content_recording: bool | None = None) -> None
Parameters
| Name | Description |
|---|---|
|
enable_content_recording
|
Whether to record message content in spans.
If Default value: None
|
is_content_recording_enabled
Check whether message content recording is enabled.
is_content_recording_enabled() -> bool
Returns
| Type | Description |
|---|---|
|
|
is_instrumented
Check whether VoiceLive tracing is currently active.
is_instrumented() -> bool
Returns
| Type | Description |
|---|---|
|
|
uninstrument
Remove trace instrumentation for VoiceLive.
uninstrument() -> None