Skip to content

fix(cli): Keep SDK log attributes log-only in sentry local - #2394

Open
sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/local-sdk-attribute-scope
Open

sentry-junior[bot] wants to merge 2 commits into
mainfrom
fix/local-sdk-attribute-scope

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #2369 and #2377.

The keys we started hiding on log lines (user.*, asctime, request, server_time, logger.*) were also applied to transactions and spans. So -a moved a span's user.email into the sdk group. They now only apply to logs.

Other small fixes:

  • Only the user fields the SDK copies onto logs are hidden (user.id, user.email, user.name, user.username, user.ip_address). Your own user.plan still shows.
  • A bare request is hidden only on Python logs, or when it's an object repr like <WSGIRequest …>.
  • Rust logs hide os.name, os.version and parent_span_id. Ruby logs hide parameters. Other SDKs keep those as normal attributes.
  • event list ranks warn and warning logs the same.
  • The -a help now says "transaction, span and log".

Before:

10:00:06 [INFO]    [SERVER]  Checkout done [os.name=macos] [os.version=15.1] [order_id=o-1] [parent_span_id=b0e6f15b45c36b12]
{"type":"transaction",...,"attributes":{"sdk":{"user.email":"jane@example.com","asctime":"..."}}}

After:

10:00:06 [INFO]    [SERVER]  Checkout done [order_id=o-1]
{"type":"transaction",...,"attributes":{"user":{"user.email":"jane@example.com","asctime":"..."}}}

via @MathurAditya724.

--

View Session [Sentry]

The keys added to hide SDK log noise also moved transaction and span
attributes such as user.email and asctime into the sdk group. They now
apply to logs only.

- Only the scope user keys (user.id, user.email, user.name,
  user.username, user.ip_address) are hidden, so custom user.* keys show.
- A bare request is hidden only for Python or an object repr.
- sentry-rust's os.name, os.version and parent_span_id, and sentry-ruby's
  parameters, are hidden on those SDKs' logs.
- event list ranks warn and warning logs the same.

Co-Authored-By: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
cli Ready Ready Preview Nov 18, 2026 10:12pm UTC
sentry-local Ready Ready Preview Nov 18, 2026 10:12pm UTC

Request Review

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 18, 2026 19:45
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 18, 2026
…te-scope

# Conflicts:
#	packages/cli/src/lib/formatters/local.ts

This branch was successfully deployed

2 active deployments
Preview – cli — de36e30d Deployed Nov 18, 2026 by vercel[bot]
Preview – sentry-local — de36e30d Deployed Nov 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant