Documentation
¶
Overview ¶
Package metrics provides Prometheus metrics collection for capabilities.
Index ¶
- func Module() fx.Option
- func SetDefaultAgentCollector(c *AgentCollector)
- type AgentCollector
- func (c *AgentCollector) IncCompact(status string)
- func (c *AgentCollector) IncDoomLoop(tool string)
- func (c *AgentCollector) IncLLMRequest(model, status string)
- func (c *AgentCollector) IncLLMRetry(model string)
- func (c *AgentCollector) IncOverflowRetry(level string)
- func (c *AgentCollector) IncRunTotal(status string)
- func (c *AgentCollector) IncSensorLint(status string)
- func (c *AgentCollector) IncToolTotal(tool, status string)
- func (c *AgentCollector) ObserveLLMDuration(model string, seconds float64)
- func (c *AgentCollector) ObserveToolDuration(tool string, seconds float64)
- func (c *AgentCollector) ObserveTurnDuration(status string, seconds float64)
- type CapabilityCollector
- func (c *CapabilityCollector) DecBulkheadActive(capName string)
- func (c *CapabilityCollector) DecBulkheadQueued(capName string)
- func (c *CapabilityCollector) IncBulkheadActive(capName string)
- func (c *CapabilityCollector) IncBulkheadDropped(capName, reason string)
- func (c *CapabilityCollector) IncBulkheadQueued(capName string)
- func (c *CapabilityCollector) IncEventDropped(capName, operation, reason string)
- func (c *CapabilityCollector) IncInvokeError(capName, operation, errorCode string)
- func (c *CapabilityCollector) IncInvokeTotal(capName, operation, status string)
- func (c *CapabilityCollector) ObserveBulkheadWaitDuration(capName string, seconds float64)
- func (c *CapabilityCollector) ObserveInvokeDuration(capName, operation string, seconds float64)
- type EventCollector
- type EventSourceCollector
- func (c *EventSourceCollector) IncPollError(resource string)
- func (c *EventSourceCollector) IncPollEvents(resource, eventType string)
- func (c *EventSourceCollector) IncPollTotal(resource, status string)
- func (c *EventSourceCollector) IncWebhookEvents(path string)
- func (c *EventSourceCollector) IncWebhookTotal(path, status string)
- func (c *EventSourceCollector) ObservePollDuration(resource string, seconds float64)
- func (c *EventSourceCollector) ObserveStateFlushDuration(seconds float64)
- type PipelineCollector
- func (c *PipelineCollector) IncCronExec(pipeline, status string)
- func (c *PipelineCollector) IncCronSkip(pipeline string)
- func (c *PipelineCollector) IncResume(pipeline string)
- func (c *PipelineCollector) IncRunTotal(pipeline, status string)
- func (c *PipelineCollector) IncStepRetry(pipeline, step string)
- func (c *PipelineCollector) IncStepTotal(pipeline, step, status string)
- func (c *PipelineCollector) ObserveCronDuration(pipeline string, seconds float64)
- func (c *PipelineCollector) ObserveRunDuration(pipeline, status string, seconds float64)
- func (c *PipelineCollector) ObserveStepDuration(pipeline, step, capability, status string, seconds float64)
- type WorkflowCollector
- func (c *WorkflowCollector) IncResume(workflow string)
- func (c *WorkflowCollector) IncRunTotal(workflow, status string)
- func (c *WorkflowCollector) IncStepRetry(workflow, step string)
- func (c *WorkflowCollector) IncStepTotal(workflow, step, status string)
- func (c *WorkflowCollector) ObserveRunDuration(workflow, status string, seconds float64)
- func (c *WorkflowCollector) ObserveStepDuration(workflow, step, actionType, status string, seconds float64)
- func (c *WorkflowCollector) SetConcurrency(workflow string, count int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultAgentCollector ¶ added in v0.95.0
func SetDefaultAgentCollector(c *AgentCollector)
SetDefaultAgentCollector installs the process-wide agent metrics collector.
Types ¶
type AgentCollector ¶ added in v0.95.0
type AgentCollector struct {
// contains filtered or unexported fields
}
AgentCollector holds typed metrics for agent harness runs. When initialized with a nil stats, all methods are no-op.
func Agent ¶ added in v0.95.0
func Agent() *AgentCollector
Agent returns the default collector or a no-op collector when unset.
func DefaultAgentCollector ¶ added in v0.95.0
func DefaultAgentCollector() *AgentCollector
DefaultAgentCollector returns the process-wide agent metrics collector (may be nil).
func NewAgentCollector ¶ added in v0.95.0
func NewAgentCollector(st *stats.Stats) *AgentCollector
NewAgentCollector creates an AgentCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.
func (*AgentCollector) IncCompact ¶ added in v0.95.0
func (c *AgentCollector) IncCompact(status string)
IncCompact increments the compaction counter.
func (*AgentCollector) IncDoomLoop ¶ added in v0.95.0
func (c *AgentCollector) IncDoomLoop(tool string)
IncDoomLoop increments the doom loop counter.
func (*AgentCollector) IncLLMRequest ¶ added in v0.95.0
func (c *AgentCollector) IncLLMRequest(model, status string)
IncLLMRequest increments the LLM request counter.
func (*AgentCollector) IncLLMRetry ¶ added in v0.95.0
func (c *AgentCollector) IncLLMRetry(model string)
IncLLMRetry increments the LLM retry counter.
func (*AgentCollector) IncOverflowRetry ¶ added in v0.95.0
func (c *AgentCollector) IncOverflowRetry(level string)
IncOverflowRetry increments the overflow retry counter for a degrade level.
func (*AgentCollector) IncRunTotal ¶ added in v0.95.0
func (c *AgentCollector) IncRunTotal(status string)
IncRunTotal increments the agent run counter.
func (*AgentCollector) IncSensorLint ¶ added in v0.95.0
func (c *AgentCollector) IncSensorLint(status string)
IncSensorLint increments the observation-only lint sensor counter.
func (*AgentCollector) IncToolTotal ¶ added in v0.95.0
func (c *AgentCollector) IncToolTotal(tool, status string)
IncToolTotal increments the tool execution counter.
func (*AgentCollector) ObserveLLMDuration ¶ added in v0.95.0
func (c *AgentCollector) ObserveLLMDuration(model string, seconds float64)
ObserveLLMDuration records an LLM request duration.
func (*AgentCollector) ObserveToolDuration ¶ added in v0.95.0
func (c *AgentCollector) ObserveToolDuration(tool string, seconds float64)
ObserveToolDuration records a tool execution duration.
func (*AgentCollector) ObserveTurnDuration ¶ added in v0.95.0
func (c *AgentCollector) ObserveTurnDuration(status string, seconds float64)
ObserveTurnDuration records a turn duration observation.
type CapabilityCollector ¶ added in v0.97.8
type CapabilityCollector struct {
// contains filtered or unexported fields
}
CapabilityCollector holds typed metrics for capability invocations. When initialized with a nil stats, all methods are no-op.
func NewCapabilityCollector ¶ added in v0.97.8
func NewCapabilityCollector(st *stats.Stats) *CapabilityCollector
NewCapabilityCollector creates a CapabilityCollector backed by stats. Returns a no-op collector when stats is nil or if registration fails.
func (*CapabilityCollector) DecBulkheadActive ¶ added in v0.97.8
func (c *CapabilityCollector) DecBulkheadActive(capName string)
DecBulkheadActive decrements the bulkhead active gauge.
func (*CapabilityCollector) DecBulkheadQueued ¶ added in v0.97.8
func (c *CapabilityCollector) DecBulkheadQueued(capName string)
DecBulkheadQueued decrements the bulkhead queued gauge.
func (*CapabilityCollector) IncBulkheadActive ¶ added in v0.97.8
func (c *CapabilityCollector) IncBulkheadActive(capName string)
IncBulkheadActive increments the bulkhead active gauge.
func (*CapabilityCollector) IncBulkheadDropped ¶ added in v0.97.8
func (c *CapabilityCollector) IncBulkheadDropped(capName, reason string)
IncBulkheadDropped increments the bulkhead dropped counter.
func (*CapabilityCollector) IncBulkheadQueued ¶ added in v0.97.8
func (c *CapabilityCollector) IncBulkheadQueued(capName string)
IncBulkheadQueued increments the bulkhead queued gauge.
func (*CapabilityCollector) IncEventDropped ¶ added in v0.97.8
func (c *CapabilityCollector) IncEventDropped(capName, operation, reason string)
IncEventDropped increments the event dropped counter.
func (*CapabilityCollector) IncInvokeError ¶ added in v0.97.8
func (c *CapabilityCollector) IncInvokeError(capName, operation, errorCode string)
IncInvokeError increments the error counter for the given capability, operation, and error code.
func (*CapabilityCollector) IncInvokeTotal ¶ added in v0.97.8
func (c *CapabilityCollector) IncInvokeTotal(capName, operation, status string)
IncInvokeTotal increments the invoke counter for the given capability, operation, and status.
func (*CapabilityCollector) ObserveBulkheadWaitDuration ¶ added in v0.97.8
func (c *CapabilityCollector) ObserveBulkheadWaitDuration(capName string, seconds float64)
ObserveBulkheadWaitDuration records bulkhead queue wait duration.
func (*CapabilityCollector) ObserveInvokeDuration ¶ added in v0.97.8
func (c *CapabilityCollector) ObserveInvokeDuration(capName, 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.