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
Sice version [`3.2.0`](https://github.com/quantum-elixir/quantum-core/releases/tag/v3.2.0)`quantum` supports [`:telemetry`](https://hexdocs.pm/telemetry) metrics.
4
+
5
+
<!--
6
+
large parts of this docs are copied from https://raw.githubusercontent.com/phoenixframework/phoenix/master/guides/telemetry.md
7
+
thanks phoenix :heart:
8
+
-->
9
+
10
+
## Overview
11
+
12
+
The [`:telemetry`](https://hexdocs.pm/telemetry) library allows you to emit events at various stages of an application's lifecycle. You can then respond to these events by, among other things, aggregating them as metrics and sending the metrics data to a reporting destination.
13
+
14
+
Telemetry stores events by their name in an ETS table, along with the handler for each event. Then, when a given event is executed, Telemetry looks up its handler and invokes it.
15
+
16
+
## Telemetry Events
17
+
18
+
Many Elixir libraries (including Quantum) are already using
19
+
the [`:telemetry`](http://hexdocs.pm/telemetry) package as a
20
+
way to give users more insight into the behavior of their
21
+
applications, by emitting events at key moments in the
22
+
application lifecycle.
23
+
24
+
A Telemetry event is made up of the following:
25
+
26
+
*`name` - A string (e.g. `"my_app.worker.stop"`) or a
27
+
list of atoms that uniquely identifies the event.
28
+
29
+
*`measurements` - A map of atom keys (e.g. `:duration`)
30
+
and numeric values.
31
+
32
+
*`metadata` - A map of key/value pairs that can be used
33
+
for tagging metrics.
34
+
35
+
### A Quantum Example
36
+
37
+
Here is an example of an event from your endpoint:
38
+
39
+
*`[:quantum, :job, :stop]` - dispatched whenever a job
0 commit comments