reqly 0.1.1__tar.gz → 0.1.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.
- {reqly-0.1.1 → reqly-0.1.2}/PKG-INFO +1 -1
- {reqly-0.1.1 → reqly-0.1.2}/pyproject.toml +1 -1
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/shipper.py +10 -3
- {reqly-0.1.1 → reqly-0.1.2}/reqly.egg-info/PKG-INFO +1 -1
- {reqly-0.1.1 → reqly-0.1.2}/README.md +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/__init__.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/__init__.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/buffer.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/capture.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/client.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/config.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/core/sampling.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/integrations/__init__.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/integrations/fastapi.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly/integrations/flask.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly.egg-info/SOURCES.txt +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly.egg-info/dependency_links.txt +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly.egg-info/requires.txt +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/reqly.egg-info/top_level.txt +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/setup.cfg +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/tests/test_buffer.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/tests/test_capture.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/tests/test_fastapi_integration.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/tests/test_flask_integration.py +0 -0
- {reqly-0.1.1 → reqly-0.1.2}/tests/test_sampling.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "reqly"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
8
8
|
description = "Auto-instrumentation SDK for FastAPI and Flask: zero-code latency, error rates, and status codes shipped to a Reqly collector."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -59,12 +59,19 @@ class Shipper:
|
|
|
59
59
|
for attempt in range(_MAX_RETRIES):
|
|
60
60
|
try:
|
|
61
61
|
response = self._client.post("/v1/ingest", json=payload)
|
|
62
|
-
if response.status_code <
|
|
62
|
+
if response.status_code < 400:
|
|
63
63
|
self.shipped_events += len(events)
|
|
64
64
|
return True
|
|
65
|
+
if response.status_code != 429:
|
|
66
|
+
# permanent client error (auth failure, bad payload, etc.) — no point retrying
|
|
67
|
+
logger.warning(
|
|
68
|
+
"reqly: collector rejected batch with %s, dropping",
|
|
69
|
+
response.status_code,
|
|
70
|
+
)
|
|
71
|
+
self.dropped_batches += 1
|
|
72
|
+
return False
|
|
65
73
|
logger.debug(
|
|
66
|
-
"reqly:
|
|
67
|
-
response.status_code,
|
|
74
|
+
"reqly: rate-limited (429), attempt %d/%d",
|
|
68
75
|
attempt + 1,
|
|
69
76
|
_MAX_RETRIES,
|
|
70
77
|
)
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|