Documentation
¶
Overview ¶
Package telemetry records named SpeechKit framework outcomes on the active OpenTelemetry span. It is the only place in the public SDK that imports OpenTelemetry, which keeps the root speechkit package free of that dependency (boundary rule 7).
With no TracerProvider installed (the local-only default) RecordOutcome is a zero-cost no-op.
Index ¶
Constants ¶
const ( OutcomeEmptyFinalTranscript = "empty_final_transcript" OutcomePCMQueueDrop = "pcm_queue_drop" OutcomeAssistEmptySpeak = "assist_empty_speak" OutcomeAssistTTSFailed = "assist_tts_failed" )
Outcome names for RecordOutcome. Keep these stable — backends and alerts key on the string, not on log message text.
Variables ¶
This section is empty.
Functions ¶
func RecordOutcome ¶
RecordOutcome attaches a named framework result to the active span.
This is the vendor-neutral error/outcome seam: callers keep using slog for operators, but user-visible failures also land on the trace so a configured OTLP backend can surface them. With no TracerProvider installed (the local-only default) this is a zero-cost no-op.
Types ¶
type Attr ¶
Attr is one key/value pair attached to a recorded outcome. It exists so RecordOutcome does not put OpenTelemetry in an embedder's own signatures: a host records outcomes with SpeechKit's own vocabulary, and whether a tracing backend is installed stays SpeechKit's business.
func Float64Attr ¶
Float64Attr builds an Attr holding a float64.
func StringAttr ¶
StringAttr builds an Attr holding a string. StringAttr, Int64Attr, Float64Attr and BoolAttr read better at a call site than a struct literal and keep the value's type explicit.