feat(ingester): forward metric rollups to the sink webhook - #2
Merged
Conversation
The sink previously received only fingerprinted occurrences, so the cloud dashboard had error counts but no request denominator. Include the 1-minute usage rollup points in the same sink payload (new optional `metrics` field, version unchanged) and forward from /v1/metrics too, which previously never reached the sink at all. Generated-By: PostHog Code Task-Id: 6e0925be-ecd5-42ee-9fde-895c4678bde4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extends the best-effort sink forward so the cloud dashboard gets a complete signal:
forwardToSinknow includes the batch's 1-minute usage rollup points as an optionalmetricsarray (payloadversion: 1unchanged — existing sinks that ignore unknown fields are unaffected). Without this, the sink only ever saw error occurrences, so any downstream error-rate computation had no request denominator./v1/metricsnow forwards its rollup points too — previously that endpoint never called the sink at all, so OTLP metric-only exporters were invisible downstream.The receiving side (
POST /runtime/sinkin the Autter cloud backend) rolls these into hourly per-service buckets.Validation
npm run build(tsc) ✅Created with PostHog Code