Uh oh!
There was an error while loading. Please reload this page.
docs(javascript): Add "Attributes" to enriching events - #18729
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Uh oh!
There was an error while loading. Please reload this page.
| 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. |
There was a problem hiding this comment.
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.
| **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> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
l: Might be worth adding an AvailableSince 10.61.0 here but happy to leave up to you.
bbe5282 to
d0ea1f6CompareUh oh!
There was an error while loading. Please reload this page.
## DESCRIBE YOUR PR Follow-up on this PR: - #18729 This PR now adds more examples and also links back to metrics/logs/attributes.
<!-- 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>
<!-- 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>
DESCRIBE YOUR PR
Adds docs for "Attributes" (similar to the docs for "Tags") based on those changelog entries:
And this PR:
Sentry.setAttribute(s)APIs sentry-javascript#21705 (shipped with 10.61.0)Related to: getsentry/sentry-javascript#21218