Documentation
¶
Overview ¶
Package observability provides observability utilities
Index ¶
- Variables
- func RecordArchivedTaskDeleted(queue, model string)
- func RecordDependencyValidation(model, result string, duration float64)
- func RecordError(component, errorType string)
- func RecordExternalCacheMiss(model string)
- func RecordModelBounds(model string, minBound, maxBound uint64)
- func RecordScheduledTaskExecution(model, operation, status string)
- func RecordScheduledTaskRegistered(model, operation string)
- func RecordTaskComplete(model, worker, status string, duration float64)
- func RecordTaskEnqueued(model string)
- func RecordTaskStart(model, worker string)
- func StartMetricsServer(addr string)
Constants ¶
This section is empty.
Variables ¶
var ( // TasksTotal tracks the total number of tasks processed TasksTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_tasks_total", Help: "Total number of tasks processed", }, []string{"model", "status"}, ) // TaskDuration measures task execution duration in seconds TaskDuration = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "cbt_task_duration_seconds", Help: "Task execution duration in seconds", Buckets: prometheus.ExponentialBuckets(0.1, 2, 10), }, []string{"model", "status"}, ) // TasksRunning tracks the number of currently running tasks TasksRunning = promauto.NewGaugeVec( prometheus.GaugeOpts{ Name: "cbt_tasks_running", Help: "Number of currently running tasks", }, []string{"model", "worker"}, ) // DependencyValidationTotal counts total dependency validation attempts DependencyValidationTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_dependency_validation_total", Help: "Total dependency validation attempts", }, []string{"model", "result"}, ) // DependencyValidationDuration measures time taken to validate dependencies DependencyValidationDuration = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "cbt_dependency_validation_duration_seconds", Help: "Time taken to validate dependencies", Buckets: prometheus.ExponentialBuckets(0.001, 2, 10), }, []string{"model"}, ) // TasksEnqueued counts total number of tasks enqueued TasksEnqueued = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_tasks_enqueued_total", Help: "Total number of tasks enqueued", }, []string{"model"}, ) // ErrorsTotal counts total number of errors ErrorsTotal = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_errors_total", Help: "Total number of errors", }, []string{"component", "error_type"}, ) // ExternalCacheMisses tracks cache misses for external model bounds ExternalCacheMisses = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_external_cache_misses_total", Help: "Total number of cache misses for external model bounds", }, []string{"model"}, ) // ScheduledTasksRegistered tracks registered scheduled tasks ScheduledTasksRegistered = promauto.NewGaugeVec( prometheus.GaugeOpts{ Name: "cbt_scheduled_tasks_registered", Help: "Number of scheduled tasks currently registered", }, []string{"model", "operation"}, ) // ScheduledTaskExecutions tracks scheduled task executions ScheduledTaskExecutions = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_scheduled_task_executions_total", Help: "Total number of scheduled task executions", }, []string{"model", "operation", "status"}, ) // ArchivedTasksDeleted tracks tasks deleted from archive ArchivedTasksDeleted = promauto.NewCounterVec( prometheus.CounterOpts{ Name: "cbt_archived_tasks_deleted_total", Help: "Total number of archived tasks deleted", }, []string{"queue", "model"}, ) // ModelBounds tracks the min and max bounds for all models (external and transformations) ModelBounds = promauto.NewGaugeVec( prometheus.GaugeOpts{ Name: "cbt_model_bounds", Help: "Current bounds (min/max positions) for all models", }, []string{"model", "bound_type"}, ) )
Functions ¶
func RecordArchivedTaskDeleted ¶ added in v0.0.2
func RecordArchivedTaskDeleted(queue, model string)
RecordArchivedTaskDeleted records an archived task being deleted
func RecordDependencyValidation ¶
RecordDependencyValidation records dependency validation metrics
func RecordExternalCacheMiss ¶
func RecordExternalCacheMiss(model string)
RecordExternalCacheMiss records a cache miss for external model bounds
func RecordModelBounds ¶ added in v0.0.3
RecordModelBounds records the min and max bounds for a model
func RecordScheduledTaskExecution ¶ added in v0.0.3
func RecordScheduledTaskExecution(model, operation, status string)
RecordScheduledTaskExecution records when a scheduled task is executed
func RecordScheduledTaskRegistered ¶ added in v0.0.3
func RecordScheduledTaskRegistered(model, operation string)
RecordScheduledTaskRegistered records when a scheduled task is registered
func RecordTaskComplete ¶
RecordTaskComplete records task completion
func RecordTaskEnqueued ¶
func RecordTaskEnqueued(model string)
RecordTaskEnqueued records task enqueue
func RecordTaskStart ¶
func RecordTaskStart(model, worker string)
RecordTaskStart records the start of a task
func StartMetricsServer ¶
func StartMetricsServer(addr string)
StartMetricsServer starts a Prometheus metrics server if it hasn't been started already.
Types ¶
This section is empty.