brexhq / substation

Substation is a toolkit for routing, normalizing, and enriching security event and audit logs.
https://substation.readme.io
MIT License
322 stars 16 forks source link

feat(transform): Add Metric Freshness Transform #178

Closed jshlbrd closed 3 months ago

jshlbrd commented 3 months ago

Description

Motivation and Context

This makes it possible to measure message / data freshness (commonly used to measure data processing systems). Unlike other metric transforms, this emits two metrics with unique attributes to differentiate them in the downstream monitoring platform. A freshness SLO can be calculated by turning these metrics into a percentage (e.g., SLO = success / (success + failure) for a particular pipeline).

It's up to the user to determine when to begin measuring freshness (as determined by the object.source_key timestamp value), but two examples are:

How Has This Been Tested?

Integration tested using the example config. End-to-end testing will come after this is merged to main (as part of testing the next release).

Types of changes

Checklist: