Logger utilities for logging and instrumentation utilities for tracking ai model interactions.
Name | Type | Description |
---|---|---|
id | str | The unique identifier for the logger. |
auto_flush | bool | Whether to automatically flush logs. Defaults to True. |
flush_interval | int | The interval (in seconds) at which to flush logs when auto_flush is True. Defaults to 10 seconds. |
Name | Type | Description |
---|---|---|
id | str | The unique identifier for the logger. |
auto_flush | bool | Whether to automatically flush logs. |
flush_interval | int | The interval (in seconds) at which to flush logs when auto_flush is True. |
Name | Type | Description |
---|---|---|
_id | str | The unique identifier for this logger instance. |
raise_exceptions | bool | Whether to raise exceptions during logging operations. |
is_debug | bool | Whether debug logging is enabled. |
writer | LogWriter | The LogWriter instance used for actual logging operations. |
Name | Type | Description |
---|---|---|
config | LoggerConfig | The configuration for the logger. |
api_key | str | The API key for the logger. |
base_url | str | The base URL for the logger. |
is_debug | bool, optional | Whether to enable debug logging. Defaults to False. |
raise_exceptions | bool, optional | Whether to raise exceptions. Defaults to False. |
Name | Type | Description |
---|---|---|
config | SessionConfig | The configuration for the new session. |
Name | Description |
---|---|
[Session](/sdk/python/references/logger/components/session) | The newly created session. |
Name | Type | Description |
---|---|---|
config | TraceConfig | The configuration for the new trace. |
Name | Description |
---|---|
[Trace](/sdk/python/references/logger/components/trace) | The newly created trace. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
key | str | The key of the tag. |
value | str | The value of the tag. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
event_id | str | The ID of the event. |
event | str | The name of the event. |
data | Any | The data associated with the event. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
feedback | Feedback | The feedback to add. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
config | TraceConfig | The configuration for the trace. |
Name | Description |
---|---|
[Trace](/sdk/python/references/logger/components/trace) | The newly created trace. |
Name | Type | Description |
---|---|---|
session_id | str | The ID of the session. |
config | TraceConfig | The configuration for the trace. |
Name | Description |
---|---|
[Trace](/sdk/python/references/logger/components/trace) | The newly created trace. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | GenerationConfig | The configuration for the generation. |
Name | Description |
---|---|
[Generation](/sdk/python/references/logger/components/generation) | The newly created generation. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | GenerationConfig | The configuration for the generation. |
Name | Description |
---|---|
[Generation](/sdk/python/references/logger/components/generation) | The newly created generation. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | RetrievalConfig | The configuration for the retrieval. |
Name | Description |
---|---|
[Retrieval](/sdk/python/references/logger/components/retrieval) | The newly created retrieval. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | RetrievalConfig | The configuration for the retrieval. |
Name | Description |
---|---|
[Retrieval](/sdk/python/references/logger/components/retrieval) | The newly created retrieval. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | SpanConfig | The configuration for the span. |
Name | Description |
---|---|
[Span](/sdk/python/references/logger/components/span) | The newly created span. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | SpanConfig | The configuration for the span. |
Name | Description |
---|---|
[Span](/sdk/python/references/logger/components/span) | The newly created span. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
key | str | The key of the tag. |
value | str | The value of the tag. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
config | ToolCallConfig | The configuration for the tool call. |
Name | Description |
---|---|
[ToolCall](/sdk/python/references/models/prompt) | The newly created tool call. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
event_id | str | The ID of the event. |
event | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags associated with the event. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
input | str | The input for the trace. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
output | str | The output for the trace. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
feedback | Feedback | The feedback to add. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
metadata | Dict[str, Any] | The metadata to add. |
Name | Type | Description |
---|---|---|
trace_id | str | The ID of the trace. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
model | str | The model for the generation. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
message | Any | The OpenAI chat message to add. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
model_parameters | dict | The model parameters for the generation. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
result | Any | The result for the generation. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
Name | Type | Description |
---|---|---|
generation_id | str | The ID of the generation. |
error | GenerationError | The error for the generation. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | GenerationConfig | The configuration for the generation. |
Name | Description |
---|---|
[Generation](/sdk/python/references/logger/components/generation) | The newly created generation. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | GenerationConfig | The configuration for the generation. |
Name | Description |
---|---|
[Generation](/sdk/python/references/logger/components/generation) | The newly created generation. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | RetrievalConfig | The configuration for the retrieval. |
Name | Description |
---|---|
[Retrieval](/sdk/python/references/logger/components/retrieval) | The newly created retrieval. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | RetrievalConfig | The configuration for the retrieval. |
Name | Description |
---|---|
[Retrieval](/sdk/python/references/logger/components/retrieval) | The newly created retrieval. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | ToolCallConfig | The configuration for the tool call. |
Name | Description |
---|---|
[ToolCall](/sdk/python/references/models/prompt) | The newly created tool call. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
key | str | The key of the tag. |
value | str | The value of the tag. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
event_id | str | The ID of the event. |
name | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags associated with the event. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
metadata | Dict[str, Any] | The metadata to add. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | SpanConfig | The configuration for the sub-span. |
Name | Description |
---|---|
[Span](/sdk/python/references/logger/components/span) | The newly created sub-span. |
Name | Type | Description |
---|---|---|
span_id | str | The ID of the span. |
config | SpanConfig | The configuration for the sub-span. |
Name | Description |
---|---|
[Span](/sdk/python/references/logger/components/span) | The newly created sub-span. |
Name | Type | Description |
---|---|---|
retrieval_id | str | The ID of the retrieval. |
Name | Type | Description |
---|---|---|
retrieval_id | str | The ID of the retrieval. |
query | Any | The input for the retrieval. |
Name | Type | Description |
---|---|---|
retrieval_id | str | The ID of the retrieval. |
docs | Any | The output for the retrieval. |
Name | Type | Description |
---|---|---|
retrieval_id | str | The ID of the retrieval. |
key | str | The key of the tag. |
value | str | The value of the tag. |
Name | Type | Description |
---|---|---|
tool_call_id | str | The ID of the tool call. |
data | Dict[str, Any] | The data to update the tool call with. |
Name | Type | Description |
---|---|---|
tool_call_id | str | The ID of the tool call. |
result | Any | The result for the tool call. |
Name | Type | Description |
---|---|---|
tool_call_id | str | The ID of the tool call. |
error | ToolCallError | The error for the tool call. |
Name | Type | Description |
---|---|---|
tool_call_id | str | The ID of the tool call. |
metadata | Dict[str, Any] | The metadata to add. |