-
-
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
base: master
Are you sure you want to change the base?
Document default sdk logging attributes #14353
Conversation
Co-authored-by: aprasad <[email protected]>
…cludes Co-authored-by: aprasad <[email protected]>
Co-authored-by: aprasad <[email protected]>
Co-authored-by: aprasad <[email protected]>
Co-authored-by: aprasad <[email protected]>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 8.54kB (0.04%) ⬆️. 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.
- `os.version`: The version of the operating system | ||
- `device.brand`: The brand of the device | ||
- `device.model`: The model of the device | ||
- `device.family`: The family of the device |
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.
The list on mobile will grow for sure. I would at least add simulator for now cause that's important and all mobile SDKs should send this.
- `device.family`: The family of the device | |
- `device.simulator`: A flag indicating whether this device is a simulator or an actual | |
device. |
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.
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