Skip to content

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jul 14, 2025

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.

  • 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 GitHub.

Project Deployment Preview Comments Updated (UTC)
sentry-docs Ready Ready Preview Comment Aug 29, 2025 5:27pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
develop-docs Ignored Ignored Preview Aug 29, 2025 5:27pm

@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 19.51kB (0.09%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-client-array-push 9.9MB -6 bytes (-0.0%) ⬇️
sentry-docs-server-cjs 12.54MB 19.51kB (0.16%) ⬆️

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.78MB -0.0%
../instrumentation.js -3 bytes 1.1MB -0.0%
9523.js -3 bytes 1.08MB -0.0%
../app/[[...path]]/page.js.nft.json 6.51kB 783.51kB 0.84%
../app/platform-redirect/page.js.nft.json 6.51kB 783.42kB 0.84%
../app/sitemap.xml/route.js.nft.json 6.51kB 780.89kB 0.84%
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 882.71kB -0.0%
static/chunks/8321-*.js -3 bytes 425.87kB -0.0%
server/middleware-*.js -5.55kB 1.0kB -84.74%
server/middleware-*.js 5.55kB 6.55kB 555.3% ⚠️
static/D33VYlDM-*.js (New) 684 bytes 684 bytes 100.0% 🚀
static/D33VYlDM-*.js (New) 77 bytes 77 bytes 100.0% 🚀
static/kQmAovY2Kgyk05YK3eAtq/_buildManifest.js (Deleted) -684 bytes 0 bytes -100.0% 🗑️
static/kQmAovY2Kgyk05YK3eAtq/_ssgManifest.js (Deleted) -77 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.

@AbhiPrasad AbhiPrasad force-pushed the cursor/document-default-sdk-logging-attributes-278d branch from 2f99929 to 9c61949 Compare August 29, 2025 15:45
@codeowner-assignment codeowner-assignment bot requested a review from a team August 29, 2025 15:45
Copy link

linear bot commented Aug 29, 2025

@AbhiPrasad AbhiPrasad force-pushed the cursor/document-default-sdk-logging-attributes-278d branch from 35a0167 to e5e567a Compare August 29, 2025 16:51
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) August 29, 2025 17:23
@AbhiPrasad AbhiPrasad merged commit 8cbdf54 into master Aug 29, 2025
13 checks passed
@AbhiPrasad AbhiPrasad deleted the cursor/document-default-sdk-logging-attributes-278d branch August 29, 2025 17:27
codyde added a commit that referenced this pull request Aug 30, 2025
* '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)
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants