ref(metrics): Remodel metric submission flow #3867
Merged
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.
Remove all the load of processing metrics from the project cache and move it to the processor.
We slowly moved more and more logic into the project cache, which over time became quite expensive to execute. Especially for heavily batched metrics. To alleviate this problem, the project cache only enriches messages with project information and dispatches based on this information instead of also dealing with filtering/validating metrics and rate limiting metrics.
Validation and rate limits are now enforced in the Processor.
The old flow for Metrics:
The new flow:
Batched metrics just have a slightly adjusted flow, they go from the endpoint to the processor for parsing, then move forward with the same
ProcessMetrics
flow.#skip-changelog