
shared
Index
- func InitTracer(ctx context.Context, serviceName string) func(context.Context) error
- func NewLogger(serviceName string) (tlog.Logger, *slog.Logger)
- func NewMetricsHandler(listenAddr string) tclient.MetricsHandler
- func NewNomadClient() (*api.Client, error)
- func PeerServiceAttr(name string) attribute.KeyValue
- func StartClientSpan(ctx context.Context, name string, attrs …attribute.KeyValue) (context.Context, trace.Span)
- func StartSpan(ctx context.Context, name string, attrs …attribute.KeyValue) (context.Context, trace.Span)
- func Tracer() trace.Tracer
func InitTracer
InitTracer configures the global OpenTelemetry tracer provider with OTLP gRPC export. The serviceName determines the node identity in the Tempo service graph. Returns a shutdown function that should be deferred.
func NewLogger
NewLogger creates a JSON slog logger wrapped for Temporal SDK compatibility. Returns both the Temporal-compatible logger (for client/worker options) and the underlying slog logger (for use outside Temporal contexts).
func NewMetricsHandler
NewMetricsHandler creates a Temporal MetricsHandler backed by Prometheus. Starts an HTTP server on listenAddr exposing /metrics. Returns nil if listenAddr is empty (metrics disabled).
func NewNomadClient
NewNomadClient creates a configured Nomad API client with OTel-instrumented HTTP transport so calls appear as edges in the service graph.
func PeerServiceAttr
PeerServiceAttr returns a peer.service attribute for service graph edges.
func StartClientSpan
StartClientSpan creates a SpanKindClient span for outbound service calls. Client spans with peer.service attributes produce edges in the Tempo service graph.
func StartSpan
StartSpan creates a new span with the given name and attributes.
func Tracer
Tracer returns the global tracer instance.
Generated by gomarkdoc