You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
marina now emits two telemetry events at the request boundary:
[marina, request, sent] - shackle dispatch (query/batch/prepare/execute)
[marina, request, error] - pool resolution failed
The sent event fires once per shackle:cast / shackle:call -- so a
reusable_query with a cache miss fires twice (prepare then execute),
giving accurate accounting of outgoing CQL operations rather than
API-level intent. Metadata is {operation, pool, async} so handlers
can break down by op kind and routing pool.
The error event fires at the four pool-resolution sites in marina.erl:
async_call/2, call/2, async_reusable_query/2, reusable_query/2.
Metadata is {operation, reason}.
Per-request shackle lifecycle (queue / send / receive) stays
observable via shackle's own telemetry hooks -- marina's events
surface the CQL-level intent without duplicating that work.
telemetry (1.4.2) promoted to a direct dep (was already transitive
via shackle). vsn switched from 'git' to an explicit '0.4.4' string,
matching the convention used by the rest of the family.
A new eunit subtest attaches a sent handler and asserts the event
fires on a real Scylla query. The error path is short and exercised
through a single shared helper -- I'm leaving its coverage to manual
review rather than wiring an app-stop dance into the parallel
integration suite.
Copy file name to clipboardExpand all lines: README.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,19 @@ Asynchronous (return a `shackle:request_id()`, consume via `marina:receive_respo
120
120
-**Token-aware routing.** On boot, a balanced BST over token intervals is compiled to a runtime-generated `marina_ring_utils:lookup/1`. Routing keys are hashed with Murmur3 and traverse the tree in O(log N).
121
121
-**Topology refresh.**`marina_control` holds one long-lived CQL connection subscribed to `TOPOLOGY_CHANGE`, `STATUS_CHANGE`, and `SCHEMA_CHANGE`. Any topology event — or any reconnect — re-queries `system.peers` and posts `{topology_full_sync, Nodes}` to the pool server, which diffs the node list, adds/removes pools, evicts prepared-statement cache for removed pools, and rebuilds the ring.
122
122
123
+
## Telemetry
124
+
125
+
marina emits two telemetry events at the request boundary. Attach handlers via `telemetry:attach/4`:
126
+
127
+
| Event | Measurements | Metadata |
128
+
|---|---|---|
129
+
|`[marina, request, sent]`|`count => 1`|`operation, pool, async`|
`sent` fires at each shackle dispatch — once per `query` / `batch` / `prepare` / `execute`. A `reusable_query` with a cache miss fires twice (`prepare` then `execute`), so the sum gives an accurate count of outgoing CQL operations. The `error` event fires when `marina_pool:node/1` returns no pool (e.g. `marina_pool_not_started`).
133
+
134
+
Per-request shackle lifecycle (queue / send / receive) remains observable via shackle's own telemetry — marina's events surface the CQL-level intent without duplicating that work.
0 commit comments