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

feat(metric-stats): Add cardinality limited outcome id #3389

Merged
merged 2 commits into from Apr 11, 2024

Conversation

Dav1dde
Copy link
Member

@Dav1dde Dav1dde commented Apr 8, 2024

Adds the new outcome id 6 cardinality_limited to the outcomes enum.

The outcome will already be emitted for the METRIC_BUCKET data category with this change, but the main purpose is to use the outcome for metric stats.

Systems checked for support:

  • Snuba
  • Getsentry
  • Sentry

@Dav1dde Dav1dde self-assigned this Apr 8, 2024
@Dav1dde Dav1dde requested a review from a team as a code owner April 8, 2024 07:48
@Dav1dde Dav1dde force-pushed the dav1d/feat/card-limit-outcome branch from 64752fe to be33d7b Compare April 8, 2024 07:50
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

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

Does this need to be a separate outcome? Could it be just a different reason instead?

@Dav1dde
Copy link
Member Author

Dav1dde commented Apr 8, 2024

That's what we have already and it doesn't fit very well.

  • filtered: from what I gathered is more of a customer opted into some filtering.
  • rate_limited: what we're using right now but this is mainly used for quotas and rate limits, if we emit a rate limit now which is independent of volume there is a good chance we're actually messing something up in the quota code. It also means we have to pack even more information into the reason, especially if we want to include the cardinality limit which was breached (similar to rate limits) into the code.
  • invalid: nothing invalid about this
  • abuse: also not an abuse case
  • client_discard: wasn't the client

Overall I think a separate category just leaves less room for errors and misinterpretations long term, with a lot more flexibility in the reason.

Copy link
Member

@iker-barriocanal iker-barriocanal left a comment

Choose a reason for hiding this comment

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

The outcome will already be emitted for the METRIC_BUCKET data category with this change

I assume the new ID is supported in sentry.

@Dav1dde Dav1dde merged commit 7104021 into master Apr 11, 2024
20 checks passed
@Dav1dde Dav1dde deleted the dav1d/feat/card-limit-outcome branch April 11, 2024 13:34
@Dav1dde Dav1dde mentioned this pull request Apr 15, 2024
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.

None yet

3 participants