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

Backpressure prototype #2189

Merged
merged 12 commits into from
Jul 7, 2023
Merged

Backpressure prototype #2189

merged 12 commits into from
Jul 7, 2023

Conversation

sl0thentr0py
Copy link
Member

@sl0thentr0py sl0thentr0py commented Jun 22, 2023

  • Monitor class performs health checks in a thread every 10s
  • if not healthy, we downsample / halve in steps till healthy again
  • exposed as experimental enable_backpressure_handling

related to #2095 and getsentry/team-sdks#10

monitor.interval = 0.1

assert monitor.is_healthy() is True
sleep(0.1) # wait for monitor to run
Copy link
Member Author

Choose a reason for hiding this comment

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

if this thread stuff turns out to be flaky with timing, i'll change the logic later

Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

lgtm, left some optional suggestions

sentry_sdk/monitor.py Outdated Show resolved Hide resolved
sentry_sdk/monitor.py Show resolved Hide resolved
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

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

🚀

@sl0thentr0py sl0thentr0py merged commit 6fe2974 into master Jul 7, 2023
243 of 244 checks passed
@sl0thentr0py sl0thentr0py deleted the neel/backpressure-impl branch July 7, 2023 12:19
sl0thentr0py added a commit to getsentry/sentry that referenced this pull request Jul 10, 2023
…100% sampling (#52104)

We want to eventually end up in a state where we sample at 100% client
(sdk) side.

Not being sure about the impact of just turning this on throughout the
system,
we will do it in steps with the new `SENTRY_MULTIPLIER_APM_SAMPLING`
config that we will bump in steps,
first on isolated instances and then everywhere till we either

* get to 100% sampling
* find and document problems that we can handle via [backpressure
management](getsentry/sentry-python#2189) in
SDKs
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.

Improve Backpressure Management
2 participants