Skip to content

Conversation

aliu39
Copy link
Member

@aliu39 aliu39 commented Jun 30, 2025

Part of https://linear.app/getsentry/project/user-feedback-abuse-quotas-05cbd47d06cf/overview

Adds the option to see feedback usage in /settings/stats. We're already emitting accepted, invalid, and rate limited outcomes. Example from my test project:
Screenshot 2025-06-30 at 1 32 16 PM

The category is named user_report_v2 in Relay, but api name for the stats endpoint is feedback, product name User Feedback. Seems there's no backend changes needed for the query.

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 30, 2025
@aliu39 aliu39 requested review from a team June 30, 2025 20:37
@aliu39 aliu39 requested a review from a team June 30, 2025 20:44
LOG_BYTE = 'logByte',
SEER_AUTOFIX = 'seerAutofix',
SEER_SCANNER = 'seerScanner',
USER_REPORT_V2 = 'user_report_v2',
Copy link
Member

Choose a reason for hiding this comment

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

this should be in the same format as the others (camel case singular). Does changing this to that format break stats?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh I thought from the comment that it's supposed to match the relay enum?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

ugh i totally missed that, then that means all the others in camel case need to be changed 😭 not your problem though, thanks for pointing out

Copy link
Member Author

Choose a reason for hiding this comment

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

LOG_BYTE = 'logByte',
SEER_AUTOFIX = 'seerAutofix',
SEER_SCANNER = 'seerScanner',
USER_REPORT_V2 = 'user_report_v2',
Copy link
Member

Choose a reason for hiding this comment

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

ugh i totally missed that, then that means all the others in camel case need to be changed 😭 not your problem though, thanks for pointing out

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Enum Naming Inconsistency

The USER_REPORT_V2 entry uses the same value 'feedback' in both DataCategory and DataCategoryExact enums. This breaks the established naming convention where DataCategory values are plural (e.g., errors, transactions) and DataCategoryExact values are singular (e.g., error, transaction). The DataCategory value should be plural (e.g., 'feedbacks') to maintain consistency and prevent issues in code relying on this distinction.

static/app/types/core.tsx#L95-L127

SEER_SCANNER = 'seerScanner',
USER_REPORT_V2 = 'feedback',
}
/**
* https://github.com/getsentry/relay/blob/master/relay-base-schema/src/data_category.rs
* Matches the backend singular backend enum directly.
* For display variations, refer to `DATA_CATEGORY_INFO` rather than manipulating these strings
*/
export enum DataCategoryExact {
ERROR = 'error',
TRANSACTION = 'transaction',
ATTACHMENT = 'attachment',
PROFILE = 'profile',
PROFILE_INDEXED = 'profileIndexed',
REPLAY = 'replay',
// TODO: Update processed and indexed transactions to camel case"
TRANSACTION_PROCESSED = 'transaction_processed',
TRANSACTION_INDEXED = 'transaction_indexed',
MONITOR = 'monitor',
MONITOR_SEAT = 'monitorSeat',
PROFILE_DURATION = 'profileDuration',
PROFILE_DURATION_UI = 'profileDurationUI',
PROFILE_CHUNK = 'profileChunk',
PROFILE_CHUNK_UI = 'profileChunkUI',
SPAN = 'span',
SPAN_INDEXED = 'spanIndexed',
UPTIME = 'uptime',
LOG_ITEM = 'logItem',
LOG_BYTE = 'logByte',
SEER_AUTOFIX = 'seerAutofix',
SEER_SCANNER = 'seerScanner',
USER_REPORT_V2 = 'feedback',

Fix in Cursor


Was this report helpful? Give feedback by reacting with 👍 or 👎

@aliu39 aliu39 merged commit 51b257e into master Jun 30, 2025
47 checks passed
@aliu39 aliu39 deleted the aliu/feedback-stats branch June 30, 2025 21:24
andrewshie-sentry pushed a commit that referenced this pull request Jul 14, 2025
…94649)

Part of
https://linear.app/getsentry/project/user-feedback-abuse-quotas-05cbd47d06cf/overview

Adds the option to see feedback usage in `/settings/stats`. We're
already emitting accepted, invalid, and rate limited outcomes. Example
from my test project:
![Screenshot 2025-06-30 at 1 32
16 PM](https://github.com/user-attachments/assets/73e97123-6872-4574-b819-068cd9323be1)

The category is named `user_report_v2` in Relay, but api name for the
stats endpoint is feedback, product name User Feedback. Seems there's no
backend changes needed for the query.
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants