User feedback
The discount didn’t apply is a complaint. The same sentence with nav→Checkout · apply_discount · total_recalculated underneath is a reproduction.
Errors are only the failures loud enough to throw. A total that comes out wrong, a button that did nothing, the right screen with the wrong data on it: none of those raise an exception, so none are logged, and you hear about them later as “checkout is weird”. So there is a second way in. The user types a sentence, and it arrives with the same breadcrumbs, screen and labels an error would.
Send it
Section titled “Send it”import { sendFeedback } from '@dasasian/firebase-structured-logger/client'
sendFeedback("the discount didn't apply")sendFeedback(text, { attachments: { screenshot }, labels: { orderId } })The breadcrumb trail is already in memory when the user hits send, which is what makes the entry actionable. It has everything a log has: breadcrumbs, screen, userId, releaseId, platform, browser, and any labels set with setUser. See breadcrumbs for the trail.
The UI is yours
Section titled “The UI is yours”The package renders nothing. Build the form, call sendFeedback on submit, say thank you.
It returns nothing either. A reference number is meaningless to a user with no portal to check it against. If your app wants correlation, pass its own id as a label.
A screenshot or a file
Section titled “A screenshot or a file”An attachment passed to sendFeedback rides the same Cloud Storage path as any other, so it is not bounded by the entry size limit. See Screenshots and files.
Where it appears
Section titled “Where it appears”Feedback is written at NOTICE, which ranks between INFO and WARNING. A person’s message outranks routine status and is not a warning about system health. Find it with the severity dropdown, or with:
labels.feedback="true"Any existing alert on severity >= WARNING ignores feedback with no configuration. An alert on labels.feedback will not fire at WARNING, because feedback is below it: query by label instead.
Feedback is exempt from the severity floor and the rate limiter. Those are volume controls for events the system emits, and someone hitting send twice is not a duplicate to throttle.
Made by Dasasian