Skip to content

docs(feedback): Specify client-side input validation - #19424

Open
philprime wants to merge 7 commits into
masterfrom
philprime/user-feedback-validation
Open

philprime wants to merge 7 commits into
masterfrom
philprime/user-feedback-validation

Conversation

@philprime

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Add draft client-side validation requirements to the Feedback specification so SDKs catch input that Sentry would discard during ingestion. Clarify the 4,096-Unicode-code-point message limit, require validation after processors and callbacks, and specify accessible form errors that preserve input instead of silently truncating it. A live character counter remains optional.

The spec moves to 1.5.0, with the new section marked draft because existing SDKs do not yet implement the full contract. Source-linked findings distinguish Relay's shared context normalization budget from Sentry's message rejection limit and legacy-only name/email limits. They also document JavaScript's missing length checks and Java's UTF-16 truncation behavior. No SDK implementation changes are included.

Context: getsentry/sentry-cocoa#8973

IS YOUR CHANGE URGENT?

  • No deadline: Not urgent, can wait up to 1 week+

PRE-MERGE CHECKLIST

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

@vercel

vercel Bot commented Sep 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Sep 17, 2026 3:26pm UTC
sentry-docs Ready Ready Preview Sep 17, 2026 3:26pm UTC

Request Review

@github-actions github-actions Bot added sdk-develop-docs PRs touching develop-docs/sdk Priority: Normal Docs review has no urgent deadline labels Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Redirect Chain Issues Detected

This PR introduces or contains redirect chains that degrade SEO and add latency.

Content Links Pointing to Redirects (1 found)

These links point to URLs that redirect. Update them to point directly to the final destination:

File Line Current Link Should Be
docs/platforms/python/integrations/celery/index.mdx 346 /guides/ /get-started/guides/

Each redirect hop loses ~15% of SEO link equity and adds latency for users.

- `message` **MUST** be a string containing at least one non-whitespace character. Missing, empty, and whitespace-only messages **MUST NOT** be sent.
- `message` **MUST NOT** exceed **4,096 Unicode code points**. Sentry validates Python string length with `len(message)`, which counts Unicode code points. SDKs **MUST** match this count for the value that will be sent, including any whitespace it retains. For well-formed Unicode, counting Unicode scalars produces the same result. Counting UTF-8 bytes, UTF-16 code units, or user-perceived characters (grapheme clusters) does not.
- If an `associated_event_id` is supplied, the SDK **MUST** validate that it is a UUID before sending it, unless the SDK's identifier type already guarantees this.
- SDKs **MUST** validate the final feedback payload after event processors and `beforeSendFeedback` have run, before enqueueing it for transport. Feedback that fails validation **MUST** be discarded, using the SDK's existing failure reporting conventions and the [client report guidance](#sdk-pipeline).

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.

Bug: The internal link to the 'client report guidance' section is broken. The anchor #sdk-pipeline does not exist in the rendered documentation.
Severity: LOW

Suggested Fix

Update the link on line 89 in develop-docs/sdk/telemetry/feedbacks.mdx. Change the anchor from #sdk-pipeline to #spec-feedback-pipeline to correctly point to the 'SDK Pipeline' section. The updated link should be [client report guidance](#spec-feedback-pipeline).

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: develop-docs/sdk/telemetry/feedbacks.mdx#L89

Potential issue: In the documentation file `develop-docs/sdk/telemetry/feedbacks.mdx`,
the link `[client report guidance](#sdk-pipeline)` on line 89 is broken. The target
section, defined with `<SpecSection id="feedback-pipeline"...>`, is rendered with the
HTML ID `spec-feedback-pipeline`. The current anchor `#sdk-pipeline` does not point to
any existing element, which will prevent users from navigating to the correct section in
the rendered documentation.

Did we get this right? 👍 / 👎 to inform future reviews.

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.

@coolguyzone coolguyzone left a comment

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.

Nice!

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

Labels

Priority: Normal Docs review has no urgent deadline sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants