Reference for tracing and telemetry in the Trace AI Python SDK.
register
Functionproject_name
(Optional[str]): Name of the project. If not provided, will be read from environment variables.project_type
(Optional[ProjectType]): Type of the project (EXPERIMENT
or OBSERVE
). Default: EXPERIMENT
.project_version_name
(Optional[str]): Version name for the project.eval_tags
(Optional[List[EvalTag]]): List of evaluation tags.session_name
(Optional[str]): Session name (only for OBSERVE
projects).metadata
(Optional[Dict[str, Any]]): Additional metadata for the project.batch
(bool): Whether to use batch span processing. Default: False
.set_global_tracer_provider
(bool): If True
, sets this provider as the global OpenTelemetry tracer provider.headers
(Optional[Dict[str, str]]): Additional headers for the exporter.verbose
(bool): If True
, prints configuration details._TracerProvider
: The configured tracer provider.ValidationError
: If arguments are invalid or duplicate custom eval names are provided.TracerProvider
Classopentelemetry.sdk.trace.TracerProvider
with Future AGI aware defaults.
endpoint
(str, optional): The collector endpoint to which spans will be exported.verbose
(bool): If True
, configuration details will be printed to stdout.add_span_processor(...)
: Registers a new SpanProcessor
for this TracerProvider
.SpanAttributes
MessageAttributes
MessageContentAttributes
ImageAttributes
AudioAttributes
DocumentAttributes
RerankerAttributes
EmbeddingAttributes
ToolCallAttributes
ToolAttributes
ProjectType
: EXPERIMENT
, OBSERVE
EvalTagType
EvalSpanKind
EvalName
Endpoints
FiSpanKindValues
FiMimeTypeValues
FiLLMSystemValues
FiLLMProviderValues