shigoto_telemetry (shigoto v1.9.10)
View SourceTelemetry events for Shigoto job lifecycle, queue operations, and resilience.
Every event is emitted through telemetry:execute/3. The tables below are the
stable event contract: attach a handler to any of these event names to feed a
metrics reporter (telemetry_metrics, Prometheus, StatsD, ...). See the
Telemetry guide for a worked telemetry_metrics example.
Measurement units:
countis always1(increment a counter/sum).durationis in native time units (erlang:monotonic_time/0deltas).duration_ms,queue_wait_ms,retry_after_msare milliseconds.progressis a percentage (0..100).claimedis a job count (jobs claimed by that poll).
Every event carries domain => [shigoto] in its metadata (used by the OTP
logger for filtering); it is omitted from the tables below for brevity.
Job Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, job, inserted] | count | job_id, worker, queue, attempt, priority |
[shigoto, job, claimed] | count, queue_wait_ms | job_id, worker, queue, attempt, priority |
[shigoto, job, completed] | count, duration, duration_ms, queue_wait_ms | job_id, worker, queue, attempt, priority |
[shigoto, job, failed] | count, duration, duration_ms, queue_wait_ms | job_id, worker, queue, attempt, priority, reason |
[shigoto, job, snoozed] | count | job_id, worker, queue, attempt, priority, snooze_reason |
[shigoto, job, discarded] | count | job_id, worker, queue, attempt, priority |
[shigoto, job, cancelled] | count | job_id, worker, queue, attempt, priority |
[shigoto, job, progress] | progress | job_id, worker, queue, attempt, priority, progress |
Queue Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, queue, poll] | count, claimed | queue |
[shigoto, queue, paused] | count | queue |
[shigoto, queue, resumed] | count | queue |
Resilience Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, resilience, rate_limited] | count, retry_after_ms | worker |
[shigoto, resilience, circuit_open] | count | worker |
[shigoto, resilience, bulkhead_full] | count | worker |
[shigoto, resilience, load_shed] | count | priority |
Batch Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, batch, completed] | count | batch_id, total_jobs, completed_jobs, discarded_jobs |
Cron Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, cron, scheduled] | count | name, worker, schedule |
Testing Events
| Event | Measurements | Metadata |
|---|---|---|
[shigoto, testing, mode_armed] | count | mode |
Emitted once at boot when a non-production testing mode (inline/manual) is
armed. Its presence in a production metrics stream is a red flag — test-only
insert behaviour is active. See shigoto_config:testing_mode/0.
Summary
Functions
-spec batch_completed(map()) -> ok.
-spec job_cancelled(map()) -> ok.
-spec job_claimed(map()) -> ok.
-spec job_discarded(map()) -> ok.
-spec job_inserted(map()) -> ok.
-spec job_progress(map(), 0..100) -> ok.
-spec queue_paused(binary()) -> ok.
-spec queue_poll(binary(), non_neg_integer()) -> ok.
-spec queue_resumed(binary()) -> ok.
-spec resilience_bulkhead_full(module()) -> ok.
-spec resilience_circuit_open(module()) -> ok.
-spec resilience_load_shed(integer()) -> ok.
-spec resilience_rate_limited(module(), non_neg_integer()) -> ok.
-spec testing_mode_armed(inline | manual) -> ok.