Ask a question to get started
Enter to send•Shift+Enter new line
class DatadogLLMObsTracer
BaseTracer
Hostname for the API call
Create and add a run to the run map for chain start events. This must sometimes be done synchronously to avoid race conditions when callbacks are backgrounded, so we expose it as a separate method here.
Create and add a run to the run map for chat model start events. This must sometimes be done synchronously to avoid race conditions when callbacks are backgrounded, so we expose it as a separate method here.
Create and add a run to the run map for LLM start events. This must sometimes be done synchronously to avoid race conditions when callbacks are backgrounded, so we expose it as a separate method here.
Create and add a run to the run map for retriever start events. This must sometimes be done synchronously to avoid race conditions when callbacks are backgrounded, so we expose it as a separate method here.
Create and add a run to the run map for tool start events. This must sometimes be done synchronously to avoid race conditions when callbacks are backgrounded, so we expose it as a separate method here.
Called when an agent is about to execute an action, with the action and the run ID.
Called when an agent finishes execution, before it exits. with the final output and the run ID.
Called at the end of a Chain run, with the outputs and the run ID.
Called if a Chain run encounters an error
Run when the chain starts running.
This method is called multiple times during a chain execution. To ensure it only runs once, it checks and updates a _checked state.
_checked
Called at the start of a Chat Model run, with the prompt(s) and the run ID.
Run when the LLM ends running.
If the includeOutputTokens is set to true, the number of tokens in the LLM completion are counted for rate limiting.
includeOutputTokens
Called if an LLM/ChatModel run encounters an error
Called when an LLM/ChatModel in streaming mode produces a new token
streaming
Run when the LLM starts running.
Called at the end of a Tool run, with the tool output and the run ID.
Called if a Tool run encounters an error
Called at the start of a Tool run, with the tool name and input and the run ID.
Transforms the prompt and model arguments into a specific format for sending to SageMaker.
Transforms SageMaker output into a desired format.
The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.