Telemetry
Monitor your rate limits and quota usage.
Halt emits events for every rate limit check, allowing you to integrate with observability tools.
Listening to Events
import { Telemetry } from 'halt';
Telemetry.on('limit:exceeded', (data) => {
console.warn(`Rate limit exceeded for ${data.key}`);
metrics.increment('rate_limit_exceeded');
});
Telemetry.on('quota:exceeded', (data) => {
console.error(`Quota exceeded for user ${data.userId}`);
});Supported Events
limit:allowed- Request passedlimit:exceeded- Request blockedquota:consumed- Quota usedquota:exceeded- Quota limit reachedpenalty:banned- User banned