Variable: firehoseMetrics
constfirehoseMetrics:object
Defined in: src/observability/prometheus-registry.ts:182
Pre-defined metrics for firehose consumer.
Type declaration
activeConnections
activeConnections:
Gauge<string>
Active firehose connections gauge.
Remarks
Number of active WebSocket connections to relay.
Example
firehoseMetrics.activeConnections.inc();
// ... on disconnect ...
firehoseMetrics.activeConnections.dec();
cursorLag
cursorLag:
Gauge<string>
Firehose cursor lag gauge.
Remarks
Measures how far behind the consumer is from the relay.
Example
firehoseMetrics.cursorLag.set(lagSeconds);
eventsTotal
eventsTotal:
Counter<"event_type">
Total firehose events processed counter.
Remarks
Labels: event_type (commit, identity, account, handle)
Example
firehoseMetrics.eventsTotal.inc({ event_type: 'commit' });
parseErrorsTotal
parseErrorsTotal:
Counter<"error_type">
Total firehose parse errors counter.
Remarks
Counts events that failed to parse from the Jetstream JSON format. Labels: error_type (json_parse, validation, unknown)
Example
firehoseMetrics.parseErrorsTotal.inc({ error_type: 'json_parse' });
Remarks
Tracks firehose event processing and lag.