Skip to content

fix: add accepted outcomes consumer#4419

Open
mzglinski wants to merge 3 commits into
getsentry:masterfrom
mzglinski:fix/accepted-outcomes-consumer
Open

fix: add accepted outcomes consumer#4419
mzglinski wants to merge 3 commits into
getsentry:masterfrom
mzglinski:fix/accepted-outcomes-consumer

Conversation

@mzglinski

Copy link
Copy Markdown
Contributor

Related to: getsentry/snuba#7781

Without this, on v26.7.0 (maybe earlier, as I updated from 26.5.0), the stats & usage page does not show data for logs, application metrics, and dynamic sampling results.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Comment thread docker-compose.yml
@mzglinski
mzglinski force-pushed the fix/accepted-outcomes-consumer branch from 4a5b931 to 5914cca Compare July 18, 2026 00:31
@mzglinski
mzglinski force-pushed the fix/accepted-outcomes-consumer branch from 5914cca to 7b19e8d Compare July 18, 2026 00:52
Comment thread docker-compose.yml
<<: *file_healthcheck_defaults
snuba-outcomes-accepted-consumer:
<<: *snuba_defaults
command: accepted-outcomes-consumer --storage eap_items --consumer-group accepted_outcomes --auto-offset-reset=earliest --max-batch-time-ms 750 --no-strict-offset-reset --accepted-outcomes-topic outcomes-billing --max-poll-interval-ms ${SENTRY_KAFKA_MAX_POLL_INTERVAL_MS:-300000}

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.

Is 750 in --max-batch-time-ms 750 correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I do not know the reasoning behind the proposed arguments in the PR I mentioned, which is why I decided to use the default of other consumers in self-hosted. This might need changing, but someone from Sentry would have to pitch in.

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.

Yeah, some are 1000, I don't know which one is correct here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I do not think 750 vs 1000 makes a big difference here, as the PR mentioned 120,000. Which is a lot, in my opinion, those are the types of nitpicks that you adjust when you start digging deeper into the data flow and the load on ClickHouse.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We always aim to insert at about once per second in all our production clusters but we have usually only one set of consumers inserting into a given cluster.

Now, in self-hosted, you usually insert to the same ClickHouse cluster so maybe setting it to even higher is useful.

Higher means we insert less often into ClickHouse, meaning fewer parts created meaning less work (fewer merges to do) for ClickHouse, at the expense of having to wait a bit longer to see the data.

Back to the self-hosted use case, we have many consumers inserting into the same cluster, usually at low throughput per consumer, so I would probably set them to 30s at least to buffer as much data as possible and insert as little as possible (so less parts created meaning less work for ClickHouse). It means consumers will use more memory (since they buffer more) and data will come every 30s as opposed to every 1s so you'll see it a little later, but the system should be working less.

Make sure the max batch size is tuned accordingly so it hits the max batch time every time.

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.

Tried this on my instance, I set it to 2000 lol. With 750ms, the number of processed events are 30-90, but when I set it to 2000, it does not really affect memory much on high throughput.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants