otel-python-style
Installation
SKILL.md
OTel Python Style
Acquire OTel objects at module scope.
from opentelemetry import metrics, trace
from opentelemetry.trace import Status, StatusCode
tracer = trace.get_tracer("mugline.voice")
meter = metrics.get_meter("mugline.voice")
greetings = meter.create_counter("voice.greetings.delivered", unit="1")
Bounded Work
tracer.start_as_current_span(...) works as both a decorator and a context
manager — the same call. For a whole function, the decorator form is usually
what you want: