Commit 1b36fbc
Javier Segura
fix: Propagate muted flag to :error telemetry events
`Repo.insert!(_, on_conflict: [set: [...]])` only round-trips the
columns it sets, so the in-memory `Error` struct dispatched to
subscribers of `[:error_tracker, :error, :new]` and
`[:error_tracker, :error, :unresolved]` always carried the schema
default (`muted: false`), regardless of the row's real state in the
database. This made the dashboard mute action effectively a no-op for
those two events.
The DB row is already queried for `existing_status` and `muted` at the
top of `upsert_error!/5`, so stamp the in-memory struct with that
value before dispatching the telemetry events. Two-line change, no
public API surface modified — subscribers that already read
`metadata.error.muted` start working without any change on their side.1 parent 3fd3e10 commit 1b36fbc
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
374 | 380 | | |
375 | 381 | | |
376 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
0 commit comments