Skip to content

Commit 1b70e4c

Browse files
committed
Update telemetry documentation for occurrence metadata
Reflect that :new and :unresolved error events now include the occurrence in their metadata, and document the nullable semantics for manual unresolves.
1 parent 1e6b8d1 commit 1b70e4c

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

lib/error_tracker/telemetry.ex

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,20 @@ defmodule ErrorTracker.Telemetry do
3131
Each event is emitted with some measures and metadata, which can be used to
3232
receive information without having to query the database again:
3333
34-
| event | measures | metadata |
35-
| --------------------------------------- | -------------- | ----------------------------------|
36-
| `[:error_tracker, :error, :new]` | `:system_time` | `:error` |
37-
| `[:error_tracker, :error, :unresolved]` | `:system_time` | `:error` |
38-
| `[:error_tracker, :error, :resolved]` | `:system_time` | `:error` |
39-
| `[:error_tracker, :occurrence, :new]` | `:system_time` | `:occurrence`, `:error`, `:muted` |
34+
| event | measures | metadata |
35+
| --------------------------------------- | -------------- | ----------------------------------------------- |
36+
| `[:error_tracker, :error, :new]` | `:system_time` | `:error`, `:occurrence` |
37+
| `[:error_tracker, :error, :unresolved]` | `:system_time` | `:error`, `:occurrence` (nullable) |
38+
| `[:error_tracker, :error, :resolved]` | `:system_time` | `:error` |
39+
| `[:error_tracker, :occurrence, :new]` | `:system_time` | `:occurrence`, `:error`, `:muted` |
4040
4141
The metadata keys contain the following data:
4242
4343
* `:error` - An `%ErrorTracker.Error{}` struct representing the error.
4444
* `:occurrence` - An `%ErrorTracker.Occurrence{}` struct representing the occurrence.
45+
For `:new` error events this is the first occurrence. For `:unresolved` events this
46+
is the occurrence that triggered the state change, or `nil` when the error was manually
47+
unresolved from the UI.
4548
* `:muted` - A boolean indicating whether the error is muted or not.
4649
"""
4750

0 commit comments

Comments
 (0)