telemetry

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

Best-effort OpenTelemetry spans for Chirp internals.

Chirp has no hard dependency onopentelemetry— OTel is configured through Pounce viaAppConfig.otel_endpoint. These helpers no-op when the SDK is absent or misbehaving,…

Best-effort OpenTelemetry spans for Chirp internals.

Chirp has no hard dependency onopentelemetry— OTel is configured through Pounce viaAppConfig.otel_endpoint. These helpers no-op when the SDK is absent or misbehaving, matchingchirp.logging's guarded pattern.

telemetry

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

trace_span
function
def trace_span(name: str, /, **attributes: Any) -> Iterator[_SpanScope | None]

Open a best-effort OTel span for a synchronous orawaitblock.

Yields a_SpanScope when OTel is available, else None. Recordsduration_mson close and marks ERROR status when the block raises.

Parameters

Name Type Default Description
name str
**attributes Any
_SpanScope
class

Manual span lifetime — use for async generators wherewithends too early.

View source · /home/runner/work/chirp/chirp/site/../src/chirp/telemetry.py:1