Skip to content

docs(java): Add scope attributes docs for logs and metrics#16639

Open
adinauer wants to merge 1 commit intomasterfrom
feat/java-android-scope-attributes
Open

docs(java): Add scope attributes docs for logs and metrics#16639
adinauer wants to merge 1 commit intomasterfrom
feat/java-android-scope-attributes

Conversation

@adinauer
Copy link
Member

@adinauer adinauer commented Mar 2, 2026

Add scope attributes sections to Java and Android logs/metrics usage docs, showing how to set attributes on the scope that are automatically included in all logs/metrics.

Covers setAttribute (with auto type inference), SentryAttribute factory methods (for explicit typing), setAttributes (for multiple at once), and removeAttribute. Examples are consistent across all four platform-includes files (logs/metrics x java/android).

Also adds scope attributes references in the default-attributes docs for Java logs and Android/Java metrics.

Co-Authored-By: Claude noreply@anthropic.com

PR Stack in SDK repo: getsentry/sentry-java#5118 (comment)

Add scope attributes sections to Java and Android logs/metrics docs,
showing setAttribute, SentryAttribute factory methods, setAttributes,
and removeAttribute APIs with consistent examples across all platforms.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Error Error Mar 2, 2026 11:55am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Mar 2, 2026 11:55am

Request Review

@adinauer adinauer marked this pull request as ready for review March 2, 2026 11:22
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.

1 participant