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.
Motivation
Today, we are emitting ingestion lag by diffing the timestamp within the Kafka or Pub/Sub message against the current timestamp.
However, that is the ingestion age, not how long it will take to get to queue 0, where the time to
queue 0
is an output from:Visually, it'll look something like this:
![image](https://private-user-images.githubusercontent.com/4412200/287367181-ef81b4c2-8556-4cea-86c8-242e27a7a1ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDY5MDksIm5iZiI6MTczOTMwNjYwOSwicGF0aCI6Ii80NDEyMjAwLzI4NzM2NzE4MS1lZjgxYjRjMi04NTU2LTRjZWEtODZjOC0yNDJlMjdhN2ExYWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMjA0MzI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NjA3MDVhZTdhMmRkZjllNDZkYzBkMWQyYzVlYWM4OTY3MWZkOGNjMmRlYTk3YWM0NmJlYjFkYjhiMWZjYWQyYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.-G0cRcsn5BsO8TDUjTRJStG6cRAJn1FW9mUcf7wh9tY)
Today, the ingestion age will just tell you how old is the message you are processing. With this PR, we will soon have the ability to display time to queue 0 within our Analytics Portal.
Changes