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

Hook up peanutbutter as an LPQ backend #69187

Merged
merged 5 commits into from
May 15, 2024
Merged

Conversation

Swatinem
Copy link
Member

Peanutbutter is a self contained service managing per-project budgets.

It should eventually replace the existing realtime_metrics code which uses redis and celery in an extremely inefficient way.


This replaces #67232, now using HTTP.

Peanutbutter is a self contained service managing per-project budgets.

It should eventually replace the existing `realtime_metrics` code which uses redis and celery in an extremely inefficient way.
@Swatinem Swatinem requested review from asottile-sentry and a team April 18, 2024 12:08
@Swatinem Swatinem self-assigned this Apr 18, 2024
@Swatinem Swatinem requested a review from a team as a code owner April 18, 2024 12:08
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 18, 2024
"image": "us.gcr.io/sentryio/peanutbutter:latest",
"environment": {},
"ports": {"4433/tcp": 4433},
"only_if": False, # TODO: we do not want/need this in normal devservices, but we need it for certain tests
Copy link
Member Author

Choose a reason for hiding this comment

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

@asottile-sentry related to your comment in #67232 (comment):
I removed the wrapper to start this server on demand. but that also means that needs to be running in the background, which is a bit overkill as this is otherwise not used for a local devserver.
Although its also very low overhead.

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

Attention: Patch coverage is 85.00000% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 79.93%. Comparing base (9c8f38e) to head (c106558).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #69187      +/-   ##
==========================================
- Coverage   80.00%   79.93%   -0.08%     
==========================================
  Files        6507     6450      -57     
  Lines      290809   288341    -2468     
  Branches    50125    49714     -411     
==========================================
- Hits       232669   230480    -2189     
+ Misses      57704    57424     -280     
- Partials      436      437       +1     
Files Coverage Δ
src/sentry/conf/server.py 89.44% <100.00%> (+0.01%) ⬆️
src/sentry/processing/realtime_metrics/pb.py 84.61% <84.61%> (ø)

... and 954 files with indirect coverage changes

@getsantry
Copy link
Contributor

getsantry bot commented May 10, 2024

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label May 10, 2024
@loewenheim loewenheim removed the Stale label May 13, 2024
Comment on lines 2758 to 2761
# This flags enables the `peanutbutter` realtime metrics backend.
# See https://github.com/getsentry/peanutbutter.
# TODO: we do not want/need this in normal devservices, but we need it for certain tests
SENTRY_USE_PEANUTBUTTER = True
Copy link
Contributor

Choose a reason for hiding this comment

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

@asottile-sentry As @Swatinem mentions, we need to enable peanutbutter to run a test. Is this the appropriate way to do this? Is it okay to start this by default?

Copy link
Member

Choose a reason for hiding this comment

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

for disabled by default you'd want False and to add it to the github action setup in .github/workflows/backend.yml / .github/actions/setup-sentry

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the explanation, I hope I did it right.

@loewenheim loewenheim merged commit 7fc733c into master May 15, 2024
48 of 49 checks passed
@loewenheim loewenheim deleted the swatinem/peanutbutter-http branch May 15, 2024 13:23
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants