debugbundle-python 1.4.1__tar.gz → 1.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/PKG-INFO +1 -1
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/pyproject.toml +1 -1
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/event_support.py +1 -1
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/structlog_integration.py +4 -1
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/PKG-INFO +1 -1
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_structlog_filtering.py +16 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/LICENSE +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/README.md +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/setup.cfg +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/__init__.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/acknowledgement.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/before_send.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/config.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/core.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/__init__.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/common.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/django.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/fastapi.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/flask.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_django.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_fastapi.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_flask.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/logger_integrations.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/py.typed +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/redaction.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/relay.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/relay_delivery.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/suppression.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/transport.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/trigger_token.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/SOURCES.txt +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/dependency_links.txt +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/requires.txt +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/top_level.txt +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_before_send.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_contracts.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_framework_integrations.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_hooks.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_http_integration.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_optional_imports.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_relay.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_relay_delivery.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_remote_config.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_repository_metadata.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_schema_validation.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_sdk.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_smoke_script.py +0 -0
- {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_trigger_token.py +0 -0
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/structlog_integration.py
RENAMED
|
@@ -88,8 +88,11 @@ class StructlogLoggerProxy:
|
|
|
88
88
|
last = processors[-1]
|
|
89
89
|
|
|
90
90
|
def observe(logger: Any, level: str, event: Any) -> Any:
|
|
91
|
+
# Renderers such as ConsoleRenderer consume fields in place.
|
|
92
|
+
# Preserve the processed event before that final rendering.
|
|
93
|
+
before_render = dict(event) if isinstance(event, dict) else event
|
|
91
94
|
result = last(logger, level, event)
|
|
92
|
-
snapshot = result if isinstance(result, dict) else
|
|
95
|
+
snapshot = result if isinstance(result, dict) else before_render
|
|
93
96
|
if isinstance(snapshot, dict):
|
|
94
97
|
record.clear()
|
|
95
98
|
record.update(snapshot)
|
|
@@ -99,6 +99,22 @@ def test_structlog_capture_failures_do_not_change_native_result_or_repeat_proces
|
|
|
99
99
|
restore()
|
|
100
100
|
|
|
101
101
|
|
|
102
|
+
def test_structlog_console_renderer_preserves_message_and_context():
|
|
103
|
+
sdk = Capture()
|
|
104
|
+
output = io.StringIO()
|
|
105
|
+
structlog.configure(
|
|
106
|
+
logger_factory=structlog.PrintLoggerFactory(file=output),
|
|
107
|
+
processors=[structlog.dev.ConsoleRenderer(colors=False)],
|
|
108
|
+
)
|
|
109
|
+
restore = _attach_structlog(sdk)
|
|
110
|
+
try:
|
|
111
|
+
structlog.get_logger().error("rendered message", order_id="123")
|
|
112
|
+
assert sdk.events == [("rendered message", "error", {"order_id": "123"})]
|
|
113
|
+
assert "rendered message" in output.getvalue()
|
|
114
|
+
finally:
|
|
115
|
+
restore()
|
|
116
|
+
|
|
117
|
+
|
|
102
118
|
def test_structlog_numeric_log_is_filtered():
|
|
103
119
|
sdk = Capture()
|
|
104
120
|
structlog.configure(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/__init__.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/common.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/django.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/fastapi.py
RENAMED
|
File without changes
|
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_django.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_fastapi.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_flask.py
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/logger_integrations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/requires.txt
RENAMED
|
File without changes
|
{debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|