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

ref(server): Build pipeline-like control flow for processing #635

Merged
merged 1 commit into from
Jun 26, 2020

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Jun 25, 2020

Refactors the envelope and event processing code by splitting the main processing function into mostly independent pipeline steps that all operate on a state. The state is mutated by each function, which can be thought of as passing it from one pipeline step to the next.

From the top-level process function, it becomes immediately clear, which actions are applied with processing and which are skipped. The stages only required for processing are conditionally compiled.

There is no change in Relay's behavior. However, there are a few changes internally:

  • The flow for rate limiting is different. The function enforce_quotas is called on every envelope in the pipeline. This prepares the pipeline for rate limiting of items other than events. At the moment, it skips all envelopes without events and still assumes DataCategory::Error for all events.
  • Clock drift correction now runs unconditionally and has been removed from the store normalize processor.
  • Processing mode errors if no event payload can be extracted from items that should create an event. This includes minidumps with their placeholders.
  • Rate limits are still sent to the project for caching. However, these messages have moved from the global error handler into the processing and upstream branches. This means that cached rate limits no longer update the project.

@jan-auer jan-auer requested a review from a team June 25, 2020 19:26
@jan-auer jan-auer self-assigned this Jun 25, 2020
@jan-auer jan-auer merged commit 0e17d77 into master Jun 26, 2020
@jan-auer jan-auer deleted the ref/event-control-flow branch June 26, 2020 07:22
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.

2 participants