Skip to content

Use context for logging extra #4694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: potel-base
Choose a base branch
from

Conversation

sentrivana
Copy link
Contributor

@sentrivana sentrivana commented Aug 12, 2025

We're moving away from using extra on the event in favor of contexts

Ref #4687

Copy link

codecov bot commented Aug 12, 2025

❌ 17 Tests Failed:

Tests completed Failed Passed Skipped
20843 17 20826 1098
View the top 3 failed test(s) by shortest run time
tests.integrations.redis.test_redis_cache_module::test_cache_basic
Stack Traces | 0.087s run time
.../integrations/redis/test_redis_cache_module.py:52: in test_cache_basic
    connection = FakeStrictRedis()
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'
tests.integrations.redis.test_redis_cache_module::test_cache_keys
Stack Traces | 0.087s run time
.../integrations/redis/test_redis_cache_module.py:91: in test_cache_keys
    connection = FakeStrictRedis()
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'
tests.integrations.redis.test_redis_cache_module::test_no_cache_basic
Stack Traces | 0.087s run time
.../integrations/redis/test_redis_cache_module.py:26: in test_no_cache_basic
    connection = FakeStrictRedis()
.tox/py3.11-redis-v4/lib/python3.11.../site-packages/fakeredis/_connection.py:185: in __init__
    super().__init__(**kwds)
E   TypeError: Redis.__init__() got an unexpected keyword argument 'lib_name'

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@sentrivana
Copy link
Contributor Author

DB / lint failures are unrelated (fixed on master, but not yet on potel-base)

@sentrivana sentrivana marked this pull request as ready for review August 14, 2025 13:40
@sentrivana sentrivana requested a review from a team as a code owner August 14, 2025 13:40
try:
1 / 0
except ZeroDivisionError as e:
capture_exception(e)
Copy link

Choose a reason for hiding this comment

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

Bug: Test Coverage Loss for Sensitive Data Scrubbing

The test_extra_scrubbing test (formerly test_breadcrumb_extra_scrubbing) lost critical coverage for sensitive data scrubbing. It no longer verifies that logging extra data is scrubbed, especially since this data now goes to event["contexts"]["logging"]. This gap could allow sensitive information like passwords or auth tokens to leak. The test also removed coverage for breadcrumb scrubbing and _meta assertions.

Fix in Cursor Fix in Web

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