Documentation
¶
Overview ¶
Package telemetry lets tokenex credential providers receive an OTel TracerProvider from their consumer, and derive their own appropriately-scoped Tracer from it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IdentityTokenAttrs ¶
IdentityTokenAttrs returns span attributes describing an identity token presented to a downstream exchange: <prefix>.expires_at always, plus <prefix>.subject / <prefix>.audience / <prefix>.iss when rawToken parses as a JWT and carries those claims (rawToken is parsed unverified — this is for telemetry, not validation).
func RecordResult ¶
RecordResult records err on span (if non-nil) and sets the span's final status accordingly. It does not end the span — callers should `defer span.End()` right after starting it, so the span is always closed regardless of which return path is taken.
func Tracer ¶
Tracer returns a Tracer scoped to scopeName from tp. If tp is nil, it falls back to the TracerProvider of the current span in ctx (if any), and finally to the OTel global TracerProvider. Providers should call this with their own package's instrumentation scope name rather than accepting a Tracer directly, so the scope always reflects the actual source of the spans regardless of what the consumer supplies.
Types ¶
This section is empty.