Skip to content

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AbhiPrasad
Copy link
Member

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.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • 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

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

@AbhiPrasad AbhiPrasad self-assigned this Jul 14, 2025
Copy link

vercel bot commented Jul 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ❌ Failed (Inspect) Jul 14, 2025 8:02pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jul 14, 2025 8:02pm

@codeowner-assignment codeowner-assignment bot requested review from a team July 14, 2025 19:42
Copy link

codecov bot commented Jul 14, 2025

Bundle Report

Changes will increase total bundle size by 8.54kB (0.04%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 11.92MB 8.54kB (0.07%) ⬆️
sentry-docs-client-array-push 9.82MB -6 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: sentry-docs-server-cjs

Assets Changed:

Asset Name Size Change Total Size Change (%)
1729.js -3 bytes 1.67MB -0.0%
../instrumentation.js -3 bytes 996.78kB -0.0%
9523.js -3 bytes 972.72kB -0.0%
../app/[[...path]]/page.js.nft.json 2.85kB 708.94kB 0.4%
../app/platform-redirect/page.js.nft.json 2.85kB 708.85kB 0.4%
../app/sitemap.xml/route.js.nft.json 2.85kB 706.82kB 0.4%
view changes for bundle: sentry-docs-client-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
static/chunks/pages/_app-*.js -3 bytes 879.57kB -0.0%
static/chunks/1831-*.js -3 bytes 422.11kB -0.0%
static/1y0JUqU3kndhEihDUaq6g/_buildManifest.js (New) 684 bytes 684 bytes 100.0% 🚀
static/1y0JUqU3kndhEihDUaq6g/_ssgManifest.js (New) 77 bytes 77 bytes 100.0% 🚀
static/Fp5FO8yrx6-*.js (Deleted) -77 bytes 0 bytes -100.0% 🗑️
static/Fp5FO8yrx6-*.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️

Copy link
Member

@philipphofmann philipphofmann left a 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

Comment on lines +3 to +5
If user information is available in the current scope:

- `user.id`: The user ID
Copy link
Member

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:

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
Copy link
Member

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.

Suggested change
- `device.family`: The family of the device
- `device.simulator`: A flag indicating whether this device is a simulator or an actual
device.

Sign up for free to 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