Documentation
¶
Index ¶
- Constants
- func NewHTTPClientRoundTripper(base http.RoundTripper, component, serverAddress string) http.RoundTripper
- func RecordConnectorAdmission(outcome string)
- func RecordConnectorConcurrency(scope string, active, queued int64)
- func RecordConnectorOperation(metric ConnectorOperationMetric)
- func RecordExecutionBroker(metric ExecutionBrokerMetric)
- func RecordExecutionBrokerSnapshot(snapshot ExecutionBrokerSnapshot)
- func RecordHTTPClient(metric HTTPClientMetric)
- func RecordPipelineRun(metric PipelineRunMetric)
- func RecordProofControl(action model.EventAction, outcome model.ProofControlOutcome)
- func RecordQueryExecution(metric QueryExecutionMetric)
- func RecordQueryLimitHit(metric QueryLimitHitMetric)
- func RecordSQLConnectorPoolSnapshot(snapshot SQLConnectorPoolSnapshot)
- func RecordTransformExecution(metric TransformExecutionMetric)
- func SetProcessMeter(meter *Meter) func()
- type Config
- type ConnectorOperationMetric
- type ExecutionBrokerMetric
- type ExecutionBrokerSnapshot
- type HTTPClientMetric
- type Meter
- func (m *Meter) HTTPMiddleware() fiber.Handler
- func (m *Meter) RecordConnectorAdmission(outcome string)
- func (m *Meter) RecordConnectorConcurrency(scope string, active, queued int64)
- func (m *Meter) RecordConnectorOperation(metric ConnectorOperationMetric)
- func (m *Meter) RecordExecutionBroker(metric ExecutionBrokerMetric)
- func (m *Meter) RecordExecutionBrokerSnapshot(snapshot ExecutionBrokerSnapshot)
- func (m *Meter) RecordHTTPClient(metric HTTPClientMetric)
- func (m *Meter) RecordPipelineRun(metric PipelineRunMetric)
- func (m *Meter) RecordProofControl(action model.EventAction, outcome model.ProofControlOutcome)
- func (m *Meter) RecordQueryExecution(metric QueryExecutionMetric)
- func (m *Meter) RecordQueryLimitHit(metric QueryLimitHitMetric)
- func (m *Meter) RecordSQLConnectorPoolSnapshot(snapshot SQLConnectorPoolSnapshot)
- func (m *Meter) RecordTransformExecution(metric TransformExecutionMetric)
- func (m *Meter) RegisterPostgresPool(provider PostgresPoolStatsProvider)
- func (m *Meter) RegisterProofActivity(provider func(context.Context) (proofevidence.ActivitySnapshot, error))
- func (m *Meter) RegisterProofMaintenanceHealth(provider func(context.Context) (model.ProofMaintenanceHealth, error))
- func (m *Meter) RegisterRiverQueueHealth(config RiverQueueHealthConfig)
- func (m *Meter) RegisterRoutes(app *fiber.App)
- type PipelineRunMetric
- type PostgresPoolStats
- type PostgresPoolStatsProvider
- type QueryExecutionMetric
- type QueryLimitHitMetric
- type RiverJobAgeMetric
- type RiverJobFinalizedMetric
- type RiverPeriodicJobLagMetric
- type RiverQueueCountMetric
- type RiverQueueDepthMetric
- type RiverQueueHealthConfig
- type RiverQueueHealthPostgresConfig
- type RiverQueueHealthProvider
- type RiverQueueHealthSnapshot
- type RiverWorkerMetric
- type SQLConnectorPoolSnapshot
- type TransformExecutionMetric
Constants ¶
const ( // ConnectorConcurrencyScopeDeployment identifies database-coordinated admission. ConnectorConcurrencyScopeDeployment = "deployment" // ConnectorConcurrencyScopeProcess identifies in-process admission. ConnectorConcurrencyScopeProcess = "process" )
Variables ¶
This section is empty.
Functions ¶
func NewHTTPClientRoundTripper ¶
func NewHTTPClientRoundTripper(base http.RoundTripper, component, serverAddress string) http.RoundTripper
func RecordConnectorAdmission ¶
func RecordConnectorAdmission(outcome string)
func RecordConnectorOperation ¶
func RecordConnectorOperation(metric ConnectorOperationMetric)
func RecordExecutionBroker ¶
func RecordExecutionBroker(metric ExecutionBrokerMetric)
func RecordExecutionBrokerSnapshot ¶
func RecordExecutionBrokerSnapshot(snapshot ExecutionBrokerSnapshot)
func RecordHTTPClient ¶
func RecordHTTPClient(metric HTTPClientMetric)
func RecordPipelineRun ¶
func RecordPipelineRun(metric PipelineRunMetric)
func RecordProofControl ¶
func RecordProofControl(action model.EventAction, outcome model.ProofControlOutcome)
func RecordQueryExecution ¶
func RecordQueryExecution(metric QueryExecutionMetric)
func RecordQueryLimitHit ¶
func RecordQueryLimitHit(metric QueryLimitHitMetric)
func RecordSQLConnectorPoolSnapshot ¶
func RecordSQLConnectorPoolSnapshot(snapshot SQLConnectorPoolSnapshot)
func RecordTransformExecution ¶
func RecordTransformExecution(metric TransformExecutionMetric)
func SetProcessMeter ¶
func SetProcessMeter(meter *Meter) func()
Types ¶
type ExecutionBrokerMetric ¶
type ExecutionBrokerSnapshot ¶
type HTTPClientMetric ¶
type Meter ¶
type Meter struct {
// contains filtered or unexported fields
}
Meter owns the application metrics registry and Fiber instrumentation.
func (*Meter) HTTPMiddleware ¶
HTTPMiddleware records low-cardinality HTTP server metrics.
func (*Meter) RecordConnectorAdmission ¶
func (*Meter) RecordConnectorConcurrency ¶
func (*Meter) RecordConnectorOperation ¶
func (m *Meter) RecordConnectorOperation(metric ConnectorOperationMetric)
func (*Meter) RecordExecutionBroker ¶
func (m *Meter) RecordExecutionBroker(metric ExecutionBrokerMetric)
func (*Meter) RecordExecutionBrokerSnapshot ¶
func (m *Meter) RecordExecutionBrokerSnapshot(snapshot ExecutionBrokerSnapshot)
func (*Meter) RecordHTTPClient ¶
func (m *Meter) RecordHTTPClient(metric HTTPClientMetric)
func (*Meter) RecordPipelineRun ¶
func (m *Meter) RecordPipelineRun(metric PipelineRunMetric)
func (*Meter) RecordProofControl ¶
func (m *Meter) RecordProofControl(action model.EventAction, outcome model.ProofControlOutcome)
func (*Meter) RecordQueryExecution ¶
func (m *Meter) RecordQueryExecution(metric QueryExecutionMetric)
func (*Meter) RecordQueryLimitHit ¶
func (m *Meter) RecordQueryLimitHit(metric QueryLimitHitMetric)
func (*Meter) RecordSQLConnectorPoolSnapshot ¶
func (m *Meter) RecordSQLConnectorPoolSnapshot(snapshot SQLConnectorPoolSnapshot)
func (*Meter) RecordTransformExecution ¶
func (m *Meter) RecordTransformExecution(metric TransformExecutionMetric)
func (*Meter) RegisterPostgresPool ¶
func (m *Meter) RegisterPostgresPool(provider PostgresPoolStatsProvider)
func (*Meter) RegisterProofActivity ¶
func (m *Meter) RegisterProofActivity(provider func(context.Context) (proofevidence.ActivitySnapshot, error))
func (*Meter) RegisterProofMaintenanceHealth ¶
func (m *Meter) RegisterProofMaintenanceHealth(provider func(context.Context) (model.ProofMaintenanceHealth, error))
RegisterProofMaintenanceHealth exposes fixed-cardinality deployment health.
func (*Meter) RegisterRiverQueueHealth ¶
func (m *Meter) RegisterRiverQueueHealth(config RiverQueueHealthConfig)
RegisterRiverQueueHealth exposes low-cardinality River queue health metrics.
func (*Meter) RegisterRoutes ¶
RegisterRoutes exposes the Prometheus scrape endpoint when metrics are enabled.
type PipelineRunMetric ¶
type PostgresPoolStats ¶
type PostgresPoolStatsProvider ¶
type PostgresPoolStatsProvider func() PostgresPoolStats
type QueryExecutionMetric ¶
type QueryLimitHitMetric ¶
type RiverJobAgeMetric ¶
RiverJobAgeMetric is the age of the oldest River job in one queue and state.
type RiverJobFinalizedMetric ¶
RiverJobFinalizedMetric is a finalized River job count grouped by queue and final state.
type RiverPeriodicJobLagMetric ¶
RiverPeriodicJobLagMetric is lag for periodic River work grouped by queue.
type RiverQueueCountMetric ¶
RiverQueueCountMetric is a River queue cumulative count grouped by queue.
type RiverQueueDepthMetric ¶
RiverQueueDepthMetric is a River queue depth value grouped by queue and state.
type RiverQueueHealthConfig ¶
type RiverQueueHealthConfig struct {
AllowedQueues []string
Provider RiverQueueHealthProvider
}
RiverQueueHealthConfig configures the River queue health collector.
type RiverQueueHealthPostgresConfig ¶
type RiverQueueHealthPostgresConfig struct {
AllowedQueues []string
PeriodicJobKinds []string
QueryTimeout time.Duration
Now func() time.Time
}
RiverQueueHealthPostgresConfig configures a Postgres-backed River health provider.
type RiverQueueHealthProvider ¶
type RiverQueueHealthProvider func(ctx context.Context) RiverQueueHealthSnapshot
RiverQueueHealthProvider returns one point-in-time aggregate River queue snapshot.
func NewRiverQueueHealthPostgresProvider ¶
func NewRiverQueueHealthPostgresProvider( pool *pgxpool.Pool, config RiverQueueHealthPostgresConfig, ) RiverQueueHealthProvider
NewRiverQueueHealthPostgresProvider builds River health snapshots from River's Postgres tables.
type RiverQueueHealthSnapshot ¶
type RiverQueueHealthSnapshot struct {
QueueDepth []RiverQueueDepthMetric
OldestJobAge []RiverJobAgeMetric
RetryTotal []RiverQueueCountMetric
DiscardedTotal []RiverQueueCountMetric
FinalizedTotal []RiverJobFinalizedMetric
Workers []RiverWorkerMetric
PeriodicJobLag []RiverPeriodicJobLagMetric
}
RiverQueueHealthSnapshot contains pre-aggregated River queue health values.
type RiverWorkerMetric ¶
type RiverWorkerMetric struct {
Queue string
ActiveWorkers int64
MaxWorkers int64
LastHeartbeatAge time.Duration
}
RiverWorkerMetric is River worker liveness and heartbeat information for one queue.