debugbundle-python 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

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/config.py CHANGED
@@ -37,15 +37,15 @@ class RemoteConfigSnapshot:
37
37
  BALANCED_CAPTURE_POLICY = CapturePolicy(
38
38
  preset="balanced",
39
39
  capture_logs="warning",
40
- capture_request_events="all",
41
- capture_breadcrumbs="local_only",
42
- capture_probe_events="standalone_when_activated",
40
+ capture_request_events="failures_only",
41
+ capture_breadcrumbs="exception_only",
42
+ capture_probe_events="buffer_only",
43
43
  )
44
44
 
45
45
  MINIMAL_CAPTURE_POLICY = CapturePolicy(
46
46
  preset="minimal",
47
- capture_logs="warning",
48
- capture_request_events="off",
47
+ capture_logs="error",
48
+ capture_request_events="failures_only",
49
49
  capture_breadcrumbs="local_only",
50
50
  capture_probe_events="buffer_only",
51
51
  )
debugbundle/core.py CHANGED
@@ -590,19 +590,25 @@ class DebugBundleSdk:
590
590
 
591
591
  def _should_capture_request_event(self, response: Mapping[str, object] | None) -> bool:
592
592
  policy = self._capture_policy.capture_request_events
593
+ status_code = None
594
+ if response is not None:
595
+ candidate = response.get("status_code") or response.get("response_status")
596
+ if isinstance(candidate, int):
597
+ status_code = candidate
598
+ if status_code is not None and status_code >= 500:
599
+ return True
593
600
  if policy == "off":
594
601
  return False
595
602
  if policy == "all":
596
603
  return True
597
604
  if response is None:
598
605
  return policy == "filtered"
599
- status_code = response.get("status_code") or response.get("response_status")
600
- if not isinstance(status_code, int):
606
+ if status_code is None:
601
607
  return policy == "filtered"
602
608
  if policy == "failures_only":
603
- return status_code >= 500
609
+ return False
604
610
  if policy == "filtered":
605
- return status_code >= 500
611
+ return False
606
612
  return True
607
613
 
608
614
  def _emit_probe_events(self, label: str, data: dict[str, object], directives: list[RemoteProbeDirective]) -> None:
debugbundle/relay.py CHANGED
@@ -15,6 +15,7 @@ ACCEPTED_EVENT_TYPES = frozenset(
15
15
  "frontend_exception",
16
16
  "error_suppressed",
17
17
  "frontend_breadcrumb",
18
+ "request_event",
18
19
  "probe_event",
19
20
  }
20
21
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: debugbundle-python
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: DebugBundle SDK for Python
5
5
  Author: DebugBundle
6
6
  License-Expression: AGPL-3.0-only
@@ -1,10 +1,10 @@
1
1
  debugbundle/__init__.py,sha256=mqibduUrdcr_fnb6k3Gwf93H7iqVBS8zd6SceX-U3Q4,5011
2
- debugbundle/config.py,sha256=tmXJc16v9yzldiyp1Fwo2s0j-Ek-wbKx__BeKaNw9ec,6097
3
- debugbundle/core.py,sha256=CTx3MmJv0x3fZr0IqTqliv0slTqmia9QVb6eEm4RPTQ,32628
2
+ debugbundle/config.py,sha256=2dLHEsh79mUaa6p7pkrQM849khwSBPg68Aq9RaeXf-8,6105
3
+ debugbundle/core.py,sha256=WbPaZjfYvnaL-a2j38t_RiCuvXgY0zOZf3gA0qZojgY,32817
4
4
  debugbundle/logger_integrations.py,sha256=RuTNaD9RRVmiE-BBkksAXWVEGaMzLrWavVpQdgGZBpE,4564
5
5
  debugbundle/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  debugbundle/redaction.py,sha256=QTaPkSsYv54yR1mz8SB6Q4vWjvp7Ddcui4WXaH2RVz8,736
7
- debugbundle/relay.py,sha256=q7WjESsIGoaHETQGhWuT-4KdBmXAocuoCLXuEaz9f60,8678
7
+ debugbundle/relay.py,sha256=TUzlUsTtDKDVVHj0RvYgQVmxy-Jl3Sp8BMBT033mGDM,8703
8
8
  debugbundle/suppression.py,sha256=XMn0GfF_-WZk2wHWk3KfbO5_u5QhEunues5h3jOInLs,4098
9
9
  debugbundle/transport.py,sha256=oOk0xazHxq9h4CneJdRODKtwDciwikvpHVJM_6iBYXU,1791
10
10
  debugbundle/trigger_token.py,sha256=YUwIWnnxu1klAVaB8Ltgk_PwWW_PPjq9rzmEbWXeFeM,4455
@@ -16,8 +16,8 @@ debugbundle/integrations/flask.py,sha256=cgyHbsAH96gpNPf_5IGJYzp2va28JdDgXROBsF-
16
16
  debugbundle/integrations/relay_django.py,sha256=_2TiH-oS0DOwThyfMJZ6ZJr5MkXEekEDaBUfPapMxt8,1523
17
17
  debugbundle/integrations/relay_fastapi.py,sha256=Z2spWy3wufVrBjYwRDDOL5Dsjgwcd5g72L23_sdulvo,1512
18
18
  debugbundle/integrations/relay_flask.py,sha256=WHk_ALOtT0xUuI1eINWFyLig9eRjSmIBpQ39xdkV608,1329
19
- debugbundle_python-0.1.0.dist-info/licenses/LICENSE,sha256=AKZZ5DQAHrOKGwt24VoRd-SXJLM9OloxlsX8ZgENdEY,735
20
- debugbundle_python-0.1.0.dist-info/METADATA,sha256=LtOnh1fp34Nt1M6Cl-K3DO9IJNEjyj6q3OXmAU9VFv4,3148
21
- debugbundle_python-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
22
- debugbundle_python-0.1.0.dist-info/top_level.txt,sha256=RCB9STTFnl1OKdojxz-xhaks2zkRFs1meZXsKnm18LM,12
23
- debugbundle_python-0.1.0.dist-info/RECORD,,
19
+ debugbundle_python-0.1.1.dist-info/licenses/LICENSE,sha256=AKZZ5DQAHrOKGwt24VoRd-SXJLM9OloxlsX8ZgENdEY,735
20
+ debugbundle_python-0.1.1.dist-info/METADATA,sha256=zl-nrFAiJBSsX9rKJI8pvTncCi3FU1i2pYFRn7kKLF4,3148
21
+ debugbundle_python-0.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
22
+ debugbundle_python-0.1.1.dist-info/top_level.txt,sha256=RCB9STTFnl1OKdojxz-xhaks2zkRFs1meZXsKnm18LM,12
23
+ debugbundle_python-0.1.1.dist-info/RECORD,,