Skip to content

Improve Backpressure Management #2095

Description

@smeubank

Sentry SDKs should be able to sample for transactions (performance events) at 100%.

Meaning the the developer setting up their Sentry service(s) for Sentry Performance should be able to set traces_sample_rate=1.0, and not worry that the SDK will have some significant impact on their applications performance, and definitely not that the service could be brought down by the SDK.

Hight throughput backend environments are typically the only services which face this concern, and then it is really only very large high traffic evironment faced by large business and enterprises.

Proposal:

  1. find ways to improve the SDK, find and fix different bottlenecks
  2. fail safe(s): SDK should be able to detect when there is failure imminent, or even a significant degradation to the host service and shut down
  3. Agents (sidecar): Should an agent be required to truly meet this goal: what changes are necessary to achieve that
  • for example HTTP requests ultimately make up a huge chunk of the OH caused by the SDks. Should we switch to a different communication method with an agent approach
  • Would there be an agent mode of the SDK(s)? When relay is running locally then switch from HTTP. Otherwise works as usual (just as suggestion)

Outcome:

Sentry.io python services sample at 100%

Activity

  1. danielkhan commented on May 11, 2023

    @danielkhan

    For context, we need 100% because it was the main reason for introducing server-side sampling and metrics extraction in the first place.
    If there is sampling on the client, all the metrics we extract in Relay are off by the client-side sampling rate.

    Let's make "As a user; I want metrics to be always accurate." the primary use case, as this can lead to other solutions than a sidecar.

    E.g.

    • we could extract metrics on the SDK
    • we could report the client-side sampling rate with the data and extrapolate later in the pipeline

    I'm not saying that these are viable solutions, but let's keep our eyes on the goal, which is accurate metrics.

  2. antonpirker commented on May 12, 2023

    @antonpirker
    Contributor
  3. linked a pull request that will close this issueBackpressure prototype #2189on Jun 23, 2023
  4. removed their assignment
    on Jul 4, 2023
  5. sl0thentr0py commented on Jul 7, 2023

    @sl0thentr0py
    Member

    initial backpressure prototype has been merged under a enable_backpressure_handling flag.
    keeping this open for now till we test in sentry, next steps are

  6. changed the title [-]Sampling at 100%[/-] [+]Improve Backpressure Management[/+] on Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions