Documentation
¶
Overview ¶
Package metrics defines all Prometheus metrics emitted by cronfoundry and exposes a /metrics handler. Producers import this package and call the package-level vars directly, e.g.
metrics.RunsStarted.WithLabelValues("my-schedule").Inc()
Set Disabled=true to make Handler() return 404. Increments still apply to the underlying counters — the toggle is reversible without restart.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DestPublish = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "destination_publish_total", Help: "Total destination publish attempts, partitioned by type and result (ok|error).", }, []string{"type", "result"})
View Source
var Disabled bool
Disabled, when true, makes Handler() return 404. Set at startup from CRONFOUNDRY_METRICS_DISABLED.
View Source
var LLMCost = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "llm_cost_usd_total", Help: "Estimated LLM cost in USD, partitioned by provider.", }, []string{"provider"})
View Source
var LLMTokens = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "llm_tokens_total", Help: "Total LLM tokens, partitioned by provider and kind (input|output).", }, []string{"provider", "kind"})
View Source
var RunDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ Namespace: namespace, Name: "run_duration_seconds", Help: "Wall-clock run duration from dispatch to finalize, partitioned by status.", Buckets: runDurationBuckets, }, []string{"status"})
View Source
var RunsFinished = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "runs_finished_total", Help: "Total runs that reached a terminal state, partitioned by status (succeeded|partial_failure|failed).", }, []string{"status"})
View Source
var RunsStarted = promauto.NewCounterVec(prometheus.CounterOpts{ Namespace: namespace, Name: "runs_started_total", Help: "Total runs dispatched by the scheduler.", }, []string{"schedule"})
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.