telemetry

package
v0.0.0-...-cea7f4a Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Auth metrics
	UserLoginTotal = promauto.NewCounter(prometheus.CounterOpts{
		Name: "justflow_user_login_total",
		Help: "Total number of user logins (JWT generation)",
	})

	// Execution metrics
	ExecutionFinishedTotal = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "justflow_execution_finished_total",
		Help: "Total number of finished executions",
	}, []string{"status", "flow_id"})

	ExecutionDurationSeconds = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name:    "justflow_execution_duration_seconds",
		Help:    "Duration of flow executions in seconds",
		Buckets: prometheus.ExponentialBuckets(1, 2, 10),
	}, []string{"status", "flow_id"})

	// Background check metrics
	BackgroundCheckDurationSeconds = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Name:    "justflow_background_check_duration_seconds",
		Help:    "Duration of background checks in seconds",
		Buckets: prometheus.DefBuckets,
	}, []string{"check_name"})
)
View Source
var (
	FlowExecutionsTotal = promauto.NewCounterVec(
		prometheus.CounterOpts{
			Name: "flow_executions_total",
			Help: "Total number of flow executions triggered",
		},
		[]string{"status", "flow_id"},
	)
)

Functions

func InitAppMetrics

func InitAppMetrics(db *bun.DB)

InitAppMetrics starts a background routine to update application metrics

func InitTracer

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

InitTracer initializes the OpenTelemetry tracer provider

func RegisterDBMetrics

func RegisterDBMetrics(db *bun.DB)

RegisterDBMetrics registers database metrics

Types

This section is empty.

Jump to

Keyboard shortcuts

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