Skip to content

docs(dataCollection): Clarify URL handling in data collection spec#17911

Merged
chargome merged 3 commits into
masterfrom
cg/datacollection-url
May 29, 2026
Merged

docs(dataCollection): Clarify URL handling in data collection spec#17911
chargome merged 3 commits into
masterfrom
cg/datacollection-url

Conversation

@chargome
Copy link
Copy Markdown
Member

Add a URLs section to the data collection spec clarifying how queryParams interacts with URL attributes.

@chargome chargome self-assigned this May 28, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

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

Project Deployment Actions Updated (UTC)
develop-docs Ready Ready Preview, Comment May 29, 2026 10:01am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sentry-docs Ignored Ignored Preview May 29, 2026 10:01am

Request Review

@chargome chargome marked this pull request as ready for review May 29, 2026 08:07
@chargome chargome requested review from cleptric and s1gr1d and removed request for s1gr1d May 29, 2026 08:07
Comment on lines +149 to +157
URL strings in span descriptions follow the format defined in [Structuring Data](/sdk/telemetry/traces/structuring-data/): `METHOD scheme://host/path` — query strings and fragments are excluded. Authority credentials (`userinfo@`) are always replaced with `[Filtered]@`.

The `queryParams` option controls query parameter filtering wherever query strings appear — including `url.full`, `url.query`, and [`request.query_string`](/sdk/foundations/envelopes/event-payloads/request/). `url.path` and the span description are unaffected since they never contain query strings. For general data scrubbing rules (variable size limits, structuring for server-side scrubbing), see [Data Scrubbing](/sdk/foundations/data-scrubbing/).

**Example:** Given a request to `https://user:pass@example.com/api/users?token=abc123&page=5`:

| Attribute | `queryParams` enabled | `queryParams` off |
|---|---|---|
| Span description | `GET https://[Filtered]:[Filtered]@example.com/api/users` | same |
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 documentation for URL credential filtering is inconsistent. The prose description of replacing userinfo@ with [Filtered]@ contradicts the provided examples.
Severity: LOW

Suggested Fix

Update the prose and examples to be consistent. Decide on a single, clear rule for filtering user credentials in URLs and ensure all descriptions and examples in the documentation reflect this rule. For instance, if the intended behavior is to replace the entire userinfo block, the examples should show https://[Filtered]@example.com/....

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/foundations/client/data-collection/index.mdx#L149-L157

Potential issue: The documentation regarding URL credential filtering is inconsistent.
The prose at line 149 states that `userinfo@` is always replaced with `[Filtered]@`.
However, this is contradicted by the examples. One example for `url.full` shows the
credentials being completely removed from the URL, not replaced. Another example for the
span description shows the username and password being filtered individually, resulting
in `[Filtered]:[Filtered]@`. This ambiguity can lead to incorrect or inconsistent
implementations by SDK developers.

Also affects:

  • develop-docs/sdk/foundations/client/data-collection/index.mdx:157~158

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

@chargome chargome enabled auto-merge (squash) May 29, 2026 09:58
@chargome chargome merged commit 14000e6 into master May 29, 2026
20 checks passed
@chargome chargome deleted the cg/datacollection-url branch May 29, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sdk-develop-docs PRs touching develop-docs/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants