docs(dart, flutter): Add Attributes page#18779
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| 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." | ||
| --- | ||
|
|
||
| <AvailableSince version="9.23.0" /> |
There was a problem hiding this comment.
I added this version number from the streamed spans docs, but attributes were available for metrics and logs before that? Please let me know @buenaflor
Updated the version number - hope this is correct!
|
|
||
| Each attribute value is created with a typed `SentryAttribute` factory: | ||
|
|
||
| | Factory | Dart Type | |
There was a problem hiding this comment.
I'm considering removing this and instead add a link to the Streamed Spans page (or API docs if it's in there) - wdyt?
| <AvailableSince version="9.9.0" /> | ||
|
|
||
| **Attributes** are key-value pairs you can attach to your telemetry (like <PlatformLink to="/tracing/instrumentation/custom-instrumentation/">spans</PlatformLink> (SDK version `9.23.0`+), <PlatformLink to="/logs">logs</PlatformLink>, and <PlatformLink to="/metrics">metrics</PlatformLink>). |
There was a problem hiding this comment.
Bug: The <AvailableSince> tag incorrectly states version 9.9.0. Using attributes for logs or metrics requires SDK version 9.23.0, creating a documentation conflict.
Severity: MEDIUM
Suggested Fix
Update the <AvailableSince version="9.9.0" /> tag to reflect the correct minimum required version. Based on the context, the most restrictive and correct version appears to be 9.23.0 for using attributes with logs or metrics. Align the version number with the requirements stated in other parts of the documentation.
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: docs/platforms/dart/common/enriching-events/attributes/index.mdx#L6-L8
Potential issue: The documentation for attributes states availability since version
`9.9.0` via the `<AvailableSince>` tag. However, this contradicts other documentation.
The Dart metrics documentation specifies that SDK version `9.11.0` is required for
metrics, and the tags page indicates that using attributes for logs or metrics requires
SDK version `9.23.0`. This discrepancy can mislead developers into attempting to use
features that are not available in their SDK version, leading to confusion and
implementation errors.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES