Skip to content

metrics: count invalid EVENTs, document what nostr_events_total counts (#255) - #267

Open
sunmoonron wants to merge 1 commit into
hoytech:masterfrom
sunmoonron:metrics-invalid-events
Open

sunmoonron wants to merge 1 commit into
hoytech:masterfrom
sunmoonron:metrics-invalid-events

Conversation

@sunmoonron

Copy link
Copy Markdown

Two small things from the discussion in #255:

  • README described nostr_events_total as "events processed", while the metric's HELP text and RelayWriter.cpp count only events persisted to the DB. The README now says persisted and points at the rejected and duplicate counters, so the two sources no longer contradict each other.
  • EVENT messages that fail validation in the ingester (bad signature, malformed JSON) were not counted by any metric, as noted in the thread. They now increment a new strfry_invalid_events_total counter. I kept strfry_write_rejected_total meaning what its HELP text says (rejected during the write path) rather than folding invalid messages into it, so nobody's dashboards change meaning.

Happy to fold the new counter into strfry_write_rejected_total instead if you would rather have one number.

…tr_events_total counts

README said nostr_events_total counts events processed while the metric's
HELP text and RelayWriter say persisted; the README now matches the code
(issue hoytech#255). Events that fail validation in the ingester were not counted
anywhere; they now increment a new strfry_invalid_events_total counter,
leaving strfry_write_rejected_total's meaning (rejected during write) as is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant