-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Document default sdk logging attributes #14353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document default sdk logging attributes #14353
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 19.51kB (0.09%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @AbhiPrasad. LGTM
If user information is available in the current scope: | ||
|
||
- `user.id`: The user ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On mobile, SDKs always provide a default user ID if none is set on the scope, which is required for release health. The SDKs use the installationId as a fallback, which they generate randomly once during the app installation:
- https://docs.sentry.io/platforms/apple/enriching-events/identify-user/
- https://docs.sentry.io/platforms/android/enriching-events/identify-user/
- https://docs.sentry.io/platforms/react-native/enriching-events/identify-user/
- https://docs.sentry.io/platforms/dotnet/enriching-events/identify-user/
- https://docs.sentry.io/platforms/dart/enriching-events/identify-user/
So users don't need to set the user.id manually on the scope. When reading this, they might believe they have to set the user.id
manually now. Maybe it makes sense to create an extra default attributes page for these SDKs.
2f99929
to
9c61949
Compare
35a0167
to
e5e567a
Compare
* 'master' of https://github.com/getsentry/sentry-docs: Layout updates; widening content div, centering and responsiveness, scrollbar update (#14766) Document default sdk logging attributes (#14353) Bump API schema to b8165143 (#14764) fix(OnboardingOptionButtons) Remove sticky css on mobile (#14690) Unreal Engine: Add migration guide (#14186) docs(ai): Update AI agent integrations list (#14769) fix: Order versioned docs select items by recency (#14768) ref(python): Update wording regarding async init (#14631) docs(aws-integration): Remove alert that ESM is not supported (#14756) fix(feedback): Update docs with SwiftUI notes (#14227) chore(docs): Remove explicit openai agents integration registration (#14718) Update list of states subject to tax on /pricing (#14763) ref(replay): Refactor pages inside the Product Walkthrough > Replay area (#14712) docs(replay): Move FAQ Replay for Android questions into dedicated troubleshooting page (#14709)
DESCRIBE YOUR PR
This PR updates the logging documentation for various SDKs to include a new "Default Attributes" section. The goal is to clearly inform users about the attributes automatically set by each SDK on log entries, providing better context for debugging. This is achieved by implementing a modular include structure, ensuring consistency and reusability of attribute definitions (core, user, server, browser, mobile) across different SDKs, along with SDK-specific message template details.
resolves https://linear.app/getsentry/issue/LOGS-172/document-default-attributes-attached-to-a-log
resolves https://linear.app/getsentry/issue/LOGS-276/update-sdk-docs-to-mention-body-is-required-in-usage-section
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:
LEGAL BOILERPLATE
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redist