Skip to main content

Overview

Returns the OpenTelemetry tracer so you can create spans manually when decorators are not sufficient.

Example

from keywordsai_tracing import get_client

client = get_client()
tracer = client.get_tracer()

with tracer.start_as_current_span("custom_operation") as span:
    span.set_attribute("custom.key", "value")
    pass