azure.ai.projects.telemetry.agents package¶
- class azure.ai.projects.telemetry.agents.AIAgentsInstrumentor[source]¶
A class for managing the trace instrumentation of AI Agents.
This class allows enabling or disabling tracing for AI Agents. and provides functionality to check whether instrumentation is active.
- instrument(enable_content_recording: bool | None = None) None[source]¶
Enable trace instrumentation for AI Agents.
- Parameters:
enable_content_recording (bool, optional) – Whether content recording is enabled as part of the traces or not. Content in this context refers to chat message content and function call tool related function names, function parameter names and values. True will enable content recording, False will disable it. If no value is provided, then the value read from environment variable AZURE_TRACING_GEN_AI_CONTENT_RECORDING_ENABLED is used. If the environment variable is not found, then the value will default to False. Please note that successive calls to instrument will always apply the content recording value provided with the most recent call to instrument (including applying the environment variable if no value is provided and defaulting to false if the environment variable is not found), even if instrument was already previously called without uninstrument being called in between the instrument calls.
- is_content_recording_enabled() bool[source]¶
This function gets the content recording value.
- Returns:
A bool value indicating whether content recording is enabled.
- Return type: