Skip to content

Backpressure prototype - #2189

Merged
sl0thentr0py merged 12 commits into
masterfrom
neel/backpressure-impl
Jul 7, 2023
Merged

sl0thentr0py merged 12 commits into
masterfrom
neel/backpressure-impl

Conversation

@sl0thentr0py

@sl0thentr0py sl0thentr0py commented Jun 22, 2023 •

Copy link
Copy Markdown
Member
  • 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

@sl0thentr0py
sl0thentr0py force-pushed the neel/backpressure-impl branch 2 times, most recently from 5b982d8 to be77ded Compare June 22, 2023 17:29
@smeubank smeubank linked an issue Jun 23, 2023 that may be closed by this pull request
@sl0thentr0py
sl0thentr0py force-pushed the neel/backpressure-impl branch 6 times, most recently from c406760 to f9a0618 Compare July 6, 2023 14:57
@sl0thentr0py
sl0thentr0py marked this pull request as ready for review July 6, 2023 14:57
Comment thread tests/test_monitor.py Outdated
monitor.interval = 0.1

assert monitor.is_healthy() is True
sleep(0.1) # wait for monitor to run

Copy link
Copy Markdown
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

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread sentry_sdk/monitor.py Resolved
Comment thread sentry_sdk/monitor.py Resolved
@sl0thentr0py
sl0thentr0py force-pushed the neel/backpressure-impl branch from 08efcfe to 1f27ad4 Compare July 7, 2023 12:07

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Collaborator

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
@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