Skip to main content

Statistics

Internal metrics for monitoring webhook processing performance.

Overview​

The webhook module tracks internal execution metrics for chain processing and task management. These metrics are used for monitoring and debugging purposes.

Available Feature

A dedicated /stats endpoint provides per-webhook request statistics. Access it via:

curl http://localhost:8000/stats

Additional statistics are also available through:

Internal Metrics​

The following metrics are tracked internally:

Chain Execution Metrics​

MetricDescription
chain_executions_totalTotal number of chain executions
chain_executions_failedNumber of failed chain executions
tasks_droppedTasks dropped due to queue limits

Available via ClickHouse​

If ClickHouse Analytics is enabled, detailed per-webhook statistics are available:

-- Requests per webhook in last hour
SELECT
webhook_id,
count() as request_count,
avg(processing_time_ms) as avg_processing_time
FROM webhook_events
WHERE timestamp > now() - INTERVAL 1 HOUR
GROUP BY webhook_id
ORDER BY request_count DESC;

-- Error rate by webhook
SELECT
webhook_id,
countIf(status != 'success') / count() * 100 as error_rate_percent
FROM webhook_events
WHERE timestamp > now() - INTERVAL 24 HOUR
GROUP BY webhook_id;

Health Check​

Basic application health is available via:

curl http://localhost:8000/health

Response:

{
"status": "healthy"
}