metrics

package
v0.92.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package metrics provides Prometheus metrics collection for abilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module() fx.Option

Types

type AbilityCollector

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

AbilityCollector holds typed metrics for ability invocations. When initialized with a nil stats, all methods are no-op.

func NewAbilityCollector

func NewAbilityCollector(st *stats.Stats) *AbilityCollector

NewAbilityCollector creates an AbilityCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.

func (*AbilityCollector) DecBulkheadActive

func (c *AbilityCollector) DecBulkheadActive(capability string)

func (*AbilityCollector) DecBulkheadQueued

func (c *AbilityCollector) DecBulkheadQueued(capability string)

func (*AbilityCollector) IncBulkheadActive

func (c *AbilityCollector) IncBulkheadActive(capability string)

func (*AbilityCollector) IncBulkheadDropped

func (c *AbilityCollector) IncBulkheadDropped(capability, reason string)

func (*AbilityCollector) IncBulkheadQueued

func (c *AbilityCollector) IncBulkheadQueued(capability string)

func (*AbilityCollector) IncEventDropped

func (c *AbilityCollector) IncEventDropped(capability, operation, reason string)

IncEventDropped increments the event dropped counter.

func (*AbilityCollector) IncInvokeError

func (c *AbilityCollector) IncInvokeError(capability, operation, errorCode string)

IncInvokeError increments the error counter for the given capability, operation, and error code.

func (*AbilityCollector) IncInvokeTotal

func (c *AbilityCollector) IncInvokeTotal(capability, operation, status string)

IncInvokeTotal increments the invoke counter for the given capability, operation, and status.

func (*AbilityCollector) ObserveBulkheadWaitDuration

func (c *AbilityCollector) ObserveBulkheadWaitDuration(capability string, seconds float64)

func (*AbilityCollector) ObserveInvokeDuration

func (c *AbilityCollector) ObserveInvokeDuration(capability, operation string, seconds float64)

ObserveInvokeDuration records an invocation duration observation.

type EventCollector

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

EventCollector holds typed metrics for event processing. When initialized with a nil stats, all methods are no-op.

func NewEventCollector

func NewEventCollector(st *stats.Stats) *EventCollector

NewEventCollector creates an EventCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.

func (*EventCollector) IncDedup

func (c *EventCollector) IncDedup(eventType, pipeline string)

IncDedup increments the dedup counter for the given event type and pipeline.

func (*EventCollector) IncMatched

func (c *EventCollector) IncMatched(eventType, pipeline string)

IncMatched increments the matched counter for the given event type and pipeline.

func (*EventCollector) IncReceived

func (c *EventCollector) IncReceived(eventType, source string)

IncReceived increments the received counter for the given event type and source.

func (*EventCollector) ObserveLag

func (c *EventCollector) ObserveLag(eventType string, seconds float64)

ObserveLag records a lag observation in seconds for the given event type.

type EventSourceCollector

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

EventSourceCollector holds typed metrics for the provider event source system. When initialized with a nil stats, all methods are no-op.

func NewEventSourceCollector

func NewEventSourceCollector(st *stats.Stats) *EventSourceCollector

NewEventSourceCollector creates an EventSourceCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.

func (*EventSourceCollector) IncPollError

func (c *EventSourceCollector) IncPollError(resource string)

IncPollError increments the poll error counter.

func (*EventSourceCollector) IncPollEvents

func (c *EventSourceCollector) IncPollEvents(resource, eventType string)

IncPollEvents increments the poll events counter.

func (*EventSourceCollector) IncPollTotal

func (c *EventSourceCollector) IncPollTotal(resource, status string)

IncPollTotal increments the poll completion counter.

func (*EventSourceCollector) IncWebhookEvents

func (c *EventSourceCollector) IncWebhookEvents(path string)

IncWebhookEvents increments the webhook events counter.

func (*EventSourceCollector) IncWebhookTotal

func (c *EventSourceCollector) IncWebhookTotal(path, status string)

IncWebhookTotal increments the webhook request counter.

func (*EventSourceCollector) ObservePollDuration

func (c *EventSourceCollector) ObservePollDuration(resource string, seconds float64)

ObservePollDuration records the poll execution time in seconds.

func (*EventSourceCollector) ObserveStateFlushDuration

func (c *EventSourceCollector) ObserveStateFlushDuration(seconds float64)

ObserveStateFlushDuration records the PG state flush duration in seconds.

type PipelineCollector

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

PipelineCollector holds typed metrics for pipeline execution. When initialized with a nil stats, all methods are no-op.

func NewPipelineCollector

func NewPipelineCollector(st *stats.Stats) *PipelineCollector

NewPipelineCollector creates a PipelineCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.

func (*PipelineCollector) IncCronExec

func (c *PipelineCollector) IncCronExec(pipeline, status string)

IncCronExec increments the cron execution counter for the given pipeline and status.

func (*PipelineCollector) IncCronSkip

func (c *PipelineCollector) IncCronSkip(pipeline string)

IncCronSkip increments the cron skip counter for the given pipeline.

func (*PipelineCollector) IncResume

func (c *PipelineCollector) IncResume(pipeline string)

IncResume increments the resume counter for the given pipeline.

func (*PipelineCollector) IncRunTotal

func (c *PipelineCollector) IncRunTotal(pipeline, status string)

IncRunTotal increments the run counter for the given pipeline and status.

func (*PipelineCollector) IncStepRetry

func (c *PipelineCollector) IncStepRetry(pipeline, step string)

IncStepRetry increments the retry counter for a given pipeline and step.

func (*PipelineCollector) IncStepTotal

func (c *PipelineCollector) IncStepTotal(pipeline, step, status string)

IncStepTotal increments the step counter for the given pipeline, step, and status.

func (*PipelineCollector) ObserveCronDuration

func (c *PipelineCollector) ObserveCronDuration(pipeline string, seconds float64)

ObserveCronDuration records a cron job duration observation for the given pipeline.

func (*PipelineCollector) ObserveRunDuration

func (c *PipelineCollector) ObserveRunDuration(pipeline, status string, seconds float64)

ObserveRunDuration records a run duration observation for the given pipeline and status.

func (*PipelineCollector) ObserveStepDuration

func (c *PipelineCollector) ObserveStepDuration(pipeline, step, capability, status string, seconds float64)

ObserveStepDuration records a step duration observation.

type WorkflowCollector

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

WorkflowCollector holds typed metrics for workflow execution. When initialized with a nil stats, all methods are no-op.

func NewWorkflowCollector

func NewWorkflowCollector(st *stats.Stats) *WorkflowCollector

NewWorkflowCollector creates a WorkflowCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.

func (*WorkflowCollector) IncResume

func (c *WorkflowCollector) IncResume(workflow string)

IncResume increments the resume counter for the given workflow.

func (*WorkflowCollector) IncRunTotal

func (c *WorkflowCollector) IncRunTotal(workflow, status string)

IncRunTotal increments the run counter for the given workflow and status.

func (*WorkflowCollector) IncStepRetry

func (c *WorkflowCollector) IncStepRetry(workflow, step string)

IncStepRetry increments the retry counter for a given workflow and step.

func (*WorkflowCollector) IncStepTotal

func (c *WorkflowCollector) IncStepTotal(workflow, step, status string)

IncStepTotal increments the step counter for the given workflow, step, and status.

func (*WorkflowCollector) ObserveRunDuration

func (c *WorkflowCollector) ObserveRunDuration(workflow, status string, seconds float64)

ObserveRunDuration records a run duration observation for the given workflow and status.

func (*WorkflowCollector) ObserveStepDuration

func (c *WorkflowCollector) ObserveStepDuration(workflow, step, actionType, status string, seconds float64)

ObserveStepDuration records a step duration observation.

func (*WorkflowCollector) SetConcurrency

func (c *WorkflowCollector) SetConcurrency(workflow string, count int)

SetConcurrency sets the concurrency gauge for the given workflow.

Jump to

Keyboard shortcuts

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