Skip to content

Coerce None values into strings in logentry params.#4121

Merged
antonpirker merged 7 commits into
masterfrom
antonpirker/fix/logging-params-as-strings
Mar 12, 2025
Merged

Coerce None values into strings in logentry params.#4121
antonpirker merged 7 commits into
masterfrom
antonpirker/fix/logging-params-as-strings

Conversation

@antonpirker

Copy link
Copy Markdown
Contributor

Nice rendering of log messages containing parameters that are None values does not work. There we coerce None values into strings to have nicer messages in Sentry UI.

Fixes #3660

@antonpirker antonpirker self-assigned this Mar 6, 2025
@codecov

codecov Bot commented Mar 6, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.56%. Comparing base (42ad8df) to head (909d94c).
Report is 1 commits behind head on master.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4121      +/-   ##
==========================================
+ Coverage   79.49%   79.56%   +0.07%     
==========================================
  Files         140      140              
  Lines       15624    15624              
  Branches     2650     2651       +1     
==========================================
+ Hits        12420    12431      +11     
+ Misses       2369     2360       -9     
+ Partials      835      833       -2     
Files with missing lines Coverage Δ
sentry_sdk/integrations/logging.py 89.10% <ø> (ø)

... and 5 files with indirect coverage changes

@sentrivana sentrivana 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.

Nice.

Some tests also need updating, it seems. It'd also be great to have a test case for the None case specifically.

@antonpirker
antonpirker enabled auto-merge (squash) March 12, 2025 14:44
@antonpirker
antonpirker merged commit 4c9731b into master Mar 12, 2025
@antonpirker
antonpirker deleted the antonpirker/fix/logging-params-as-strings branch March 12, 2025 15:04
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.

Logging message is unrendered on a webhook call

2 participants