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

ref(stats): Introduce discard outcome & reason descriptions #10585

Merged

Conversation

priscilawebdev
Copy link
Member

@priscilawebdev priscilawebdev commented Jul 4, 2024

Goal

We are currently expanding the range of outcomes visible on the stats page, as well as refining how they are presented. This pull request aims to update the documentation to reflect these changes and provides details on the reasons behind displaying each outcome.

closes getsentry/sentry#73811

Copy link

vercel bot commented Jul 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 16, 2024 9:55am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2024 9:55am


Events and attachments discarded by the system due to rate limits, quotas, spike protection, [size limits](/concepts/data-management/size-limits), or invalid data. You can see the common reasons below:

| Reason | Meaning |
Copy link
Member Author

Choose a reason for hiding this comment

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

I was uncertain about adding this table here since it can get quite lengthy. However, I didn't want to place it elsewhere, as that might make it feel disconnected from the usage stats section. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

I would not list those at all. Those outcome reasons are not stable and meant for internal use. Apart from that, they refer to internals of the system that are confusing to a user.

Copy link
Member Author

@priscilawebdev priscilawebdev Jul 7, 2024

Choose a reason for hiding this comment

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

I understand those outcome reasons are intended for internal use and may confuse users. However, if users can see this information, we should provide at least a brief explanation to ensure clarity. Are you sure it’s better to not add an explanation for these reasons?

Copy link
Member

Choose a reason for hiding this comment

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

Let's expose these reasons in a simplified and grouped way that makes it easier for users to comprehend. I will post an update here with mapped reasons and improved descriptions.

Copy link
Member

Choose a reason for hiding this comment

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

Here is a list that groups all discard reasons so that they can be understood by users. I've also added more relatable descriptions that point at docs to make this more actionable.

https://gist.github.com/jan-auer/2d29e2ee6334bbcf32514b12b42b31ea

As for the different kinds of outcomes, please show them separately in the following combination at least in charts:

  • Accepted (0)
  • Filtered (1)
  • Rate limited (2) + Abuse (4) + Cardinality Limited (6) -- currently shown as "Dropped" in the UI
  • Invalid (3)
  • Client Discard (5)

docs/product/stats/index.mdx Outdated Show resolved Hide resolved
@priscilawebdev priscilawebdev requested review from a team and rodolfoBee July 4, 2024 12:27
Copy link

codecov bot commented Jul 4, 2024

Bundle Report

Changes will increase total bundle size by 24 bytes ⬆️

Bundle name Size Change
sentry-docs-server 9.26MB 33 bytes ⬆️
sentry-docs-edge-server 252.86kB 3 bytes ⬇️
sentry-docs-client 7.88MB 6 bytes ⬇️

docs/product/stats/index.mdx Outdated Show resolved Hide resolved

#### Discarded

Events and attachments discarded on the client side due to the sampling configuration in the SDK or other factors.
Copy link
Member

Choose a reason for hiding this comment

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

"or other factors" is a bit unspecific. I would either remove this part of the sentence or list more reasons. They are documented here under "discarded_events": https://develop.sentry.dev/sdk/client-reports/#envelope-item-payload


#### Dropped

Events and attachments discarded by the system due to rate limits, quotas, spike protection, [size limits](/concepts/data-management/size-limits), or invalid data. You can see the common reasons below:
Copy link
Member

Choose a reason for hiding this comment

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

This combines the two outcomes RATE_LIMITED and INVALID. Do you really want to mix those?

Copy link
Member Author

@priscilawebdev priscilawebdev Jul 7, 2024

Choose a reason for hiding this comment

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


Events and attachments discarded by the system due to rate limits, quotas, spike protection, [size limits](/concepts/data-management/size-limits), or invalid data. You can see the common reasons below:

| Reason | Meaning |
Copy link
Member

Choose a reason for hiding this comment

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

I would not list those at all. Those outcome reasons are not stable and meant for internal use. Apart from that, they refer to internals of the system that are confusing to a user.

Co-authored-by: Jan Michael Auer <mail@jauer.org>
Copy link
Contributor

@lizokm lizokm left a comment

Choose a reason for hiding this comment

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

Thanks so much for making these updates @priscilawebdev! I left a few suggestions :)

docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
docs/product/stats/index.mdx Outdated Show resolved Hide resolved
Comment on lines 48 to 54
### Rate Limited
Events and attachments discarded due to rate limits or quota. The following reasons are currently defined:

- **Abuse**: Activated when Sentry is misused.
- **Cardinality Limited**: Exceeded internally defined cardinality limit.
- **Rate Limited**: Exceeded allowed event rate.
- **Spike Protection**: Activated to protect from any sudden quota-depleting spike. See [Spike Protection](/pricing/quotas/spike-protection/) for more information.
Copy link
Member Author

@priscilawebdev priscilawebdev Jul 15, 2024

Choose a reason for hiding this comment

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

@jan-auer can you help me with this list? I have noticed that we are displaying "Spike protection" and "Project Abuse Limit" for example

Copy link
Member

Choose a reason for hiding this comment

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

Here's a suggestion for how to structure rate limits. Please expand this with links to relevant documentation as appropriate:

- **Quota**: The monthly quota of your subscription was depleted and there is no on-demand budget left.
- **Key Limit**: Traffic exceeded a rate limit defined on the client key (DSN).
- **Spike Protection**: Activated to protect from a sudden spike in data volume. See [Spike Protection](/pricing/quotas/spike-protection/) for more information.
- **Internal Limit**: A rate limit for excessive volume was enforced by Sentry. These limits are not configurable.

Reason codes for the above are:

  • quota: *_usage_exceeded (everything that ends with "_usage_exceeded")
  • key limit: key_quota
  • spike protection: smart_rate_limit
  • internal: (everything else)

Therefore, please include the "abuse" and "cardinality" limit outcomes under "Internal Limits" for now.


- **Quota**: The monthly quota of your subscription was depleted and there is no on-demand budget left. See [Adjusting your Quota](/pricing/quotas/#adjusting-your-quota) for more information.
- **Key Limit**: Traffic exceeded a rate limit defined on the client key (DSN). See [Rate Limits](/pricing/quotas/#rate-limits) for more information.
- **Spike Protection**: Activated to protect from a sudden spike in data volume. See [Spike Protection](/pricing/quotas/spike-protection/) for more information.

Choose a reason for hiding this comment

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

suggestion: "event volume" instead of "data volume"?

Copy link
Member Author

Choose a reason for hiding this comment

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

@jan-auer what do you think?

Copy link
Member

Choose a reason for hiding this comment

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

I originally suggested "data" instead of "event", since spike protection could also apply to non-events. Today, that's not the case, so let's go with "event volume" 👍

@priscilawebdev priscilawebdev requested review from brianthi and a team July 16, 2024 09:27
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

Descriptions look good from my end, thank you!

@priscilawebdev priscilawebdev merged commit 551cea6 into master Jul 18, 2024
8 checks passed
@priscilawebdev priscilawebdev deleted the priscila/ref/usage-stats/add-reason-meanings-and-discarded branch July 18, 2024 13:30
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the stats docs with explanations for the upcoming new outcomes
5 participants