1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Operations telemetry for Boson workers.
//!
//! Install an [`OpsLog`] adapter at worker boot via [`BosonBuilder::ops_log`](https://docs.rs/boson-runtime/latest/boson_runtime/struct.BosonBuilder.html#method.ops_log).
//!
//! ## Entry points
//!
//! - [`OpsLog`] — counters, gauges, structured events (see trait for emitted names)
//! - [`install_ops_log`] — process-wide install at boot
//! - [`NoOpsLog`] / [`ConsoleOpsLog`] — built-in adapters
//! - [`ops_log_from_env`] — select adapter via `BOSON_TELEMETRY`
pub use ConsoleOpsLog;
pub use ;
pub use NoOpsLog;
/// Structured ops metrics and events for enqueue, runs, leases, and runtime health.
///
/// The runtime emits the following by default (labels vary by call site):
///
/// **Counters**
///
/// | Name | When |
/// |------|------|
/// | `boson_tasks_enqueued` | Job enqueued (`task_name`, `runtime` labels) |
/// | `boson_tasks_completed` | Handler succeeded (`task_name` label) |
/// | `boson_task_duration_ms` | Handler succeeded — duration as counter value |
/// | `boson_tasks_failed` | Handler failed (`task_name` label) |
///
/// **Events** (`log_event` name → payload highlights)
///
/// | Name | When |
/// |------|------|
/// | `boson_task_log` | Run started or completed (`event`, `task_name`, `job_id`, `run_id`, …) |
/// | `boson_handler_error` | Handler error (`task_name`, `job_id`, `message`, optional `will_retry`) |
/// | `boson_runtime_log` | Runtime ready or lease reclaim (`event`, `runtime`, …) |
///
/// Install a custom adapter with [`install_ops_log`] to forward these to your metrics stack.
/// Use [`ConsoleOpsLog`], [`NoOpsLog`], or a custom [`OpsLog`] implementation.