Skip to content

docs(javascript): Add "Attributes" to enriching events - #18729

Merged
s1gr1d merged 4 commits into
masterfrom
sig/add-attribute-page
Jul 16, 2026
Merged

docs(javascript): Add "Attributes" to enriching events#18729
s1gr1d merged 4 commits into
masterfrom
sig/add-attribute-page

Conversation

@s1gr1d

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Adds docs for "Attributes" (similar to the docs for "Tags") based on those changelog entries:

And this PR:

Related to: getsentry/sentry-javascript#21218

@vercel

vercelBot commented Jul 15, 2026

Copy link
Copy Markdown

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

ProjectDeploymentActionsUpdated (UTC)
sentry-docsReadyReadyPreviewJul 16, 2026 9:39am
1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
develop-docsIgnoredIgnoredPreviewJul 16, 2026 9:39am

Request Review

@inventarSarahinventarSarah left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks great!

Comment threaddocs/platforms/javascript/common/enriching-events/attributes/index.mdx Outdated

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for adding this!

description: "Attributes automatically enrich your telemetry with typed key-value data. Use them to add business context that you can filter and search in Sentry."
---

**Attributes** are key-value pairs you can attach to all your telemetry (like spans, logs and metrics). Unlike [tags](../tags/), which only accept string values, attributes support `string`, `number`, `boolean`, and array values.

@Lms24Lms24Jul 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

m: array support is still pending (we can send and store arrays but we can't surface them yet in the product). I know we're probably inconsistent with this already but for the time being, I'd rather not call it out in docs.

l: would reword the "All telemetry" since you can't (yet) set attributes on errors.

Suggested change
**Attributes** are key-value pairs you can attach to all your telemetry (like spans, logs and metrics). Unlike [tags](../tags/), which only accept string values, attributes support `string`, `number`, `boolean`, and array values.
**Attributes** are key-value pairs you can attach to your telemetry (spans, logs and metrics). Unlike [tags](../tags/), which only accept string values, attributes support `string`, `number` and `boolean` values.

Common uses include subscription tier, feature flags, or any business context that helps you filter and query your telemetry.
Check out [Sending Span Metrics](../../tracing/span-metrics/) for an example of how to use attributes to enrich your spans.

<Alert>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

l: should this be an AvailableSince component somewhere? No objections though, feel free to disregard.

You can add user information to events to help you identify the user that is experiencing an issue.
See <PlatformLink to="/apis/#setUser">setUser</PlatformLink> to learn how to to set the user on Sentry events.

### Setting Attributes

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

l: Might be worth adding an AvailableSince 10.61.0 here but happy to leave up to you.

@s1gr1d
s1gr1dforce-pushed the sig/add-attribute-page branch from bbe5282 to d0ea1f6CompareJuly 16, 2026 09:28
@s1gr1d
s1gr1d enabled auto-merge (squash) July 16, 2026 09:35
@s1gr1d
s1gr1d merged commit 70c8b9d into masterJul 16, 2026
21 checks passed
@s1gr1d
s1gr1d deleted the sig/add-attribute-page branch July 16, 2026 09:43
s1gr1d added a commit that referenced this pull request Jul 17, 2026
## DESCRIBE YOUR PR
Follow-up on this PR: - #18729
This PR now adds more examples and also links back to
metrics/logs/attributes.
inventarSarah added a commit that referenced this pull request Jul 28, 2026
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
This branch adds a new page, "Attributes," under "Enriching Events"
(similar to the JS SDK; see #18729).
Closes: #18778
## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] 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](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
---------
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
inventarSarah added a commit that referenced this pull request Aug 6, 2026
<!-- Use this checklist to make sure your PR is ready for merge. You may
delete any sections you don't need. -->
## DESCRIBE YOUR PR
This branch adds a new page, "Attributes," under "Enriching Events"
(similar to the JS SDK; see #18729).
>[!Important]
> Only merge after **streamed spans** docs update!
Closes: #18777
## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs
to go live.
- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+
## SLA
- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
added an urgent due date to it.
Thanks in advance for your help!
## PRE-MERGE CHECKLIST
*Make sure you've checked the following before merging your changes:*
- [ ] 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](https://github.com/orgs/getsentry/teams/docs)
## EXTRA RESOURCES
- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
---------
Co-authored-by: Ivana Kellyer <ivana.kellyer@sentry.io>
Co-authored-by: Alex Krawiec <alex.krawiec@sentry.io>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@s1gr1d@inventarSarah@Lms24