Skip to content

feat(attributes): Add missing log severity attributes - #831

Merged
srothh merged 4 commits into
mainfrom
srothh/log-severity-attributes
Nov 30, 2026
Merged

srothh merged 4 commits into
mainfrom
srothh/log-severity-attributes

Conversation

@srothh

@srothh srothh commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add missing log severity attributes sent by the Python SDK with logs

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for apply_scrubbing (i.e. manual or auto. Use never only for values that should never be scrubbed such as IDs)

Closes getsentry/sentry-python#8353
PY--3094

Add sentry.severity_txt and sentry.severity_number which are sent with logs by the Python SDK.

Refs getsentry/sentry-python#8353
PY-3094
@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sentry-conventions Ready Ready Preview Nov 30, 2026 9:28am UTC

Request Review

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add missing log severity attributes by srothh in #831
  • Add WebSocket span name convention by chargome and claude in #836

🤖 This preview updates automatically when you update the PR.

@srothh
srothh marked this pull request as ready for review November 23, 2026 16:12

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4d9799a. Configure here.

@alexander-alderman-webb alexander-alderman-webb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait a few days for others to take a look

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before we merge, can we make sure the apply_scrubbing rule is correct here? i.e. if product functionality depends on these attributes, "never" is fine (+ I don't see Pii concerns). Otherwise, let's default to "manual"

@srothh

srothh commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

Before we merge, can we make sure the apply_scrubbing rule is correct here? i.e. if product functionality depends on these attributes, "never" is fine (+ I don't see Pii concerns). Otherwise, let's default to "manual"

Thanks for flagging, I gave it a deeper look:

sentry.severity_number is not necessary for functionality, as the logs ui falls back to sentry.severity_text when it is missing. As for sentry.severity_text, from what I can tell it is needed by the logs ui; however, it is currently being overwritten in Relay in store.rs. Therefore manual as a default scrubbing rule would work for both attributes currently. If the logic in Relay ever changes it might need to be set to never again.

Change scrubbing from never to manual for severity attributes. sentry.severity_text is currently overriden in Relay
so it cannot be broken by scrubbing anyway.

Refs getsentry/sentry-python#8353
PY-3094

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking! We can go with manual for now and downgrade to never if necessary at any time :)

@srothh
srothh merged commit a1e00d4 into main Nov 30, 2026
19 checks passed
@srothh
srothh deleted the srothh/log-severity-attributes branch November 30, 2026 09:36

This branch was successfully deployed

1 active deployment
Preview — b1a4541e Deployed Nov 30, 2026 by vercel[bot]
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.

Add missing log attributes to conventions

3 participants