You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9532d29
Browse filesBrowse the repository at this point in the historyBrowse files
fix(cli): Keep SDK log attributes log-only in sentry local (#2394)
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":"..."}}}
```
<!-- junior-request-attribution:start -->
via @MathurAditya724.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:agent%3Af689f1f928b25c03737a6ea9643eadc2 -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/agent%3Af689f1f928b25c03737a6ea9643eadc2)
[[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Af689f1f928b25c03737a6ea9643eadc2/?project=4510944073809921)
<!-- junior-session-footer:end -->
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Aditya Mathur <57684218+MathurAditya724@users.noreply.github.com>
Copy file name to clipboardExpand all lines: apps/cli-docs/src/fragments/commands/local.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,7 +155,7 @@ By default, incoming envelopes are pretty-printed to the terminal:
155
155
14:32:04 [WARNING] [BROWSER] Cart is empty [page.tsx:24:19] [onClick]
156
156
```
157
157
158
-
Errors show their level, the exception type, message, and the newest stack frame from your app. Messages, such as `captureMessage` calls and Python `logging` records, show their level and text, plus the logger name when there is one. Transactions show the operation, duration, and span count. Logs show the severity level, message, and custom attributes. Attributes the SDK adds itself (`sentry.`, `http.`, `url.`, `db.`, `server.`, `code.`, `thread.`, `logger.`, `user.`, and similar prefixes, plus Python's `asctime`and Django's `request`and `server_time`) are hidden; add `--attributes` (`-a`) to list them under each log line.
158
+
Errors show their level, the exception type, message, and the newest stack frame from your app. Messages, such as `captureMessage` calls and Python `logging` records, show their level and text, plus the logger name when there is one. Transactions show the operation, duration, and span count. Logs show the severity level, message, and custom attributes. Attributes the SDK adds itself are hidden: `sentry.`, `http.`, `url.`, `db.`, `server.`, `code.`, `thread.`, `logger.`, and similar prefixes, the scope user (`user.id`, `user.email`, `user.name`, `user.username`, `user.ip_address`), Python's `asctime`, `request`and `server_time`, Rust's `os.name`, `os.version`and `parent_span_id`, and Ruby's `parameters`. Your own attributes, such as `user.plan`, still show. Add `--attributes` (`-a`) to list the hidden ones under each log line.
159
159
160
160
Events and logs use the same labels: a warning is `[WARNING]` whether the SDK sent `warning` or `warn`, and an event's logger shows as `[logger:name]`. A log's logger name is an SDK attribute, so it shows only with `-a`.
0 commit comments