telemetry

package
v0.0.0-...-727718e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginExecutorOp

func BeginExecutorOp(model, operation string) func()

BeginExecutorOp increments the in-flight gauge for the given model/operation and returns a function that decrements it. Use with defer at the top of every executor entry point:

defer telemetry.BeginExecutorOp(modelName, "create")()

func InitPrometheus

func InitPrometheus(service string)

func InitTracer

func InitTracer(ctx context.Context, serviceName string) (func(context.Context) error, error)

func MetricsHandler

func MetricsHandler() http.Handler

func RecordExecutorOperation

func RecordExecutorOperation(model, operation, result string, seconds float64)

func RecordOutboxPending

func RecordOutboxPending(count int64)

RecordOutboxPending updates the gauge of pending outbox jobs.

func RecordOutboxProcessed

func RecordOutboxProcessed(status string, latencySeconds float64)

RecordOutboxProcessed increments the processed counter and records latency.

func RegisterLokiHookIfConfigured

func RegisterLokiHookIfConfigured(logger *logrus.Logger, service string)

func ServiceName

func ServiceName() string

func Tracer

func Tracer() trace.Tracer

Types

type LokiHook

type LokiHook struct {
	// contains filtered or unexported fields
}

func NewLokiHook

func NewLokiHook(pushURL, service string) *LokiHook

func (*LokiHook) Fire

func (h *LokiHook) Fire(e *logrus.Entry) error

func (*LokiHook) Levels

func (h *LokiHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL