Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(transform): Add Metric Freshness Transform #178

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

jshlbrd
Copy link
Contributor

@jshlbrd jshlbrd commented Jun 3, 2024

Description

  • Adds a utility_metric_freshness transform with an example

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:

  • Measure freshness of an individual pipeline component (using the time_now transform)
  • Measure end-to-end freshness of an entire pipeline (using the timestamp value from the data source)

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@jshlbrd jshlbrd marked this pull request as ready for review June 3, 2024 15:19
@jshlbrd jshlbrd requested a review from a team as a code owner June 3, 2024 15:19
Copy link
Contributor

@shellcromancer shellcromancer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes themselves for the feature look good. I left 2 comments on the documentation comments and usability that are non-blocking but would be good to discuss.

transform/utility_metric_freshness.go Outdated Show resolved Hide resolved
transform/utility_metric_freshness.go Show resolved Hide resolved
@jshlbrd jshlbrd merged commit 04ed699 into main Jun 4, 2024
4 checks passed
@jshlbrd jshlbrd deleted the jshlbrd/feat/metric-freshness branch June 4, 2024 18:13
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.

None yet

2 participants