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.
Files changed (48) hide show
  1. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/PKG-INFO +1 -1
  2. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/pyproject.toml +1 -1
  3. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/event_support.py +1 -1
  4. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/structlog_integration.py +4 -1
  5. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/PKG-INFO +1 -1
  6. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_structlog_filtering.py +16 -0
  7. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/LICENSE +0 -0
  8. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/README.md +0 -0
  9. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/setup.cfg +0 -0
  10. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/__init__.py +0 -0
  11. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/acknowledgement.py +0 -0
  12. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/before_send.py +0 -0
  13. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/config.py +0 -0
  14. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/core.py +0 -0
  15. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/__init__.py +0 -0
  16. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/common.py +0 -0
  17. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/django.py +0 -0
  18. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/fastapi.py +0 -0
  19. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/flask.py +0 -0
  20. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_django.py +0 -0
  21. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_fastapi.py +0 -0
  22. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/integrations/relay_flask.py +0 -0
  23. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/logger_integrations.py +0 -0
  24. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/py.typed +0 -0
  25. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/redaction.py +0 -0
  26. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/relay.py +0 -0
  27. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/relay_delivery.py +0 -0
  28. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/suppression.py +0 -0
  29. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/transport.py +0 -0
  30. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle/trigger_token.py +0 -0
  31. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/SOURCES.txt +0 -0
  32. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/dependency_links.txt +0 -0
  33. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/requires.txt +0 -0
  34. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/src/debugbundle_python.egg-info/top_level.txt +0 -0
  35. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_before_send.py +0 -0
  36. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_contracts.py +0 -0
  37. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_framework_integrations.py +0 -0
  38. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_hooks.py +0 -0
  39. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_http_integration.py +0 -0
  40. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_optional_imports.py +0 -0
  41. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_relay.py +0 -0
  42. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_relay_delivery.py +0 -0
  43. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_remote_config.py +0 -0
  44. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_repository_metadata.py +0 -0
  45. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_schema_validation.py +0 -0
  46. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_sdk.py +0 -0
  47. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_smoke_script.py +0 -0
  48. {debugbundle_python-1.4.1 → debugbundle_python-1.4.2}/tests/test_trigger_token.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: debugbundle-python
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: DebugBundle SDK for Python
5
5
  Author: DebugBundle
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "debugbundle-python"
7
- version = "1.4.1"
7
+ version = "1.4.2"
8
8
  description = "DebugBundle SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -264,7 +264,7 @@ def sdk_version() -> str:
264
264
  try:
265
265
  return metadata.version("debugbundle-python")
266
266
  except metadata.PackageNotFoundError:
267
- return "1.4.1"
267
+ return "1.4.2"
268
268
 
269
269
 
270
270
  def sdk_config_endpoint(events_endpoint: str) -> str:
@@ -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 event
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: debugbundle-python
3
- Version: 1.4.1
3
+ Version: 1.4.2
4
4
  Summary: DebugBundle SDK for Python
5
5
  Author: DebugBundle
6
6
  License-Expression: Apache-2.0
@@ -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(