Documentation
¶
Overview ¶
Package observability holds the shared OpenTelemetry identifiers that every muster package emits under, so a single TracerProvider / MeterProvider scope joins spans, metrics, and logs across the codebase. The constants are intentionally a leaf package with no internal/* dependencies, so any internal/<svc> package can import them without violating the service-locator pattern.
Index ¶
Constants ¶
const AttrToolName = "mcp.tool.name"
AttrToolName is the OpenTelemetry attribute key carrying the MCP tool name dispatched in a request. Shared across every emitter that records tool identity so Grafana joins traces, logs, and metrics on a single key.
const TracerName = "github.com/giantswarm/muster"
TracerName is the OpenTelemetry instrumentation scope used for every span muster emits — server-side mcp-go spans, the outbound mcp-go client spans on the muster → backend leg, and per-step workflow spans. Span role is encoded in SpanKind (Server / Client / Internal) and span name (mcp.<method>, tool.<name>, workflow.step), so a single scope keeps dashboard filtering readable without a per-package suffix.
Used identically as the OTel meter scope and as the logger scope (see pkg/logging); all join on the same identifier so spans, metrics and logs correlate in Tempo, Mimir and Loki.
The name is an identifier dashboards filter on (the otel_scope_name label), not an import path: it stays at the un-suffixed repository path although the module is github.com/giantswarm/muster/v5, so no filter breaks.
Variables ¶
This section is empty.
Functions ¶
func SecondsHistogramBoundaries ¶
func SecondsHistogramBoundaries() []float64
SecondsHistogramBoundaries returns the bucket boundaries applied to every histogram instrument with unit "s".
func SecondsHistogramView ¶
SecondsHistogramView returns the sdkmetric.View that applies SecondsHistogramBoundaries to every histogram instrument with unit "s". Matching on unit rather than instrument name covers any seconds-unit histogram without enumerating them.
Types ¶
This section is empty.