Ghost/ghost/email-service
Chris Raible 829a0fc7e9
Added email analytics throughput metrics (#21694)
ref
https://linear.app/ghost/issue/ENG-1508/add-custom-metrics-for-email-analytics-jobs

- With the experimental job queue, we're using email analytics as our
initial validation test case. We're hoping to see an improvement in
Ghost's throughput for ingesting email events. However, we don't
currently collect this data point, so it's kind of impossible to tell
right now if the job queue is making things better or not.
- This PR fixes that by adding two new prometheus metrics:
- `email_analytics_events_processed` — a counter incremented each time
an event is processed. Sometimes the event has already been processed in
the past, so this doens't always result in a new event being stored in
the DB.
- `email_analytics_events_stored` — a counter incremented each time an
event is stored in the DB. For example, if an email is opened 3 times by
the same recipient, this counter will only be incremented once.
- The metrics also have a label for the event type, so we can split out
opened events from delivered events. We can use the `rate()` function in
grafana to then get an `events ingested per second` metric, and compare
sites with/without the job queue enabled.
2024-11-21 17:30:43 -08:00
..
lib Added email analytics throughput metrics (#21694) 2024-11-21 17:30:43 -08:00
test Added email analytics throughput metrics (#21694) 2024-11-21 17:30:43 -08:00
.eslintrc.js Added email service package (#15849) 2022-11-21 10:29:53 +01:00
index.js Added eslint rule for file naming convention 2023-05-09 12:34:34 -04:00
package.json Update dependency html-validate to v8.24.1 2024-10-07 15:13:31 +02:00
README.md Added email service package (#15849) 2022-11-21 10:29:53 +01:00

Email Service

Manages how posts are sent via email

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests