realuptime-errors 0.4.0__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.
- realuptime_errors-0.4.0/LICENSE +21 -0
- realuptime_errors-0.4.0/PKG-INFO +96 -0
- realuptime_errors-0.4.0/README.md +82 -0
- realuptime_errors-0.4.0/pyproject.toml +20 -0
- realuptime_errors-0.4.0/realuptime_errors.egg-info/PKG-INFO +96 -0
- realuptime_errors-0.4.0/realuptime_errors.egg-info/SOURCES.txt +12 -0
- realuptime_errors-0.4.0/realuptime_errors.egg-info/dependency_links.txt +1 -0
- realuptime_errors-0.4.0/realuptime_errors.egg-info/top_level.txt +1 -0
- realuptime_errors-0.4.0/realuptime_errors.py +1152 -0
- realuptime_errors-0.4.0/setup.cfg +4 -0
- realuptime_errors-0.4.0/tests/test_client.py +216 -0
- realuptime_errors-0.4.0/tests/test_middleware.py +53 -0
- realuptime_errors-0.4.0/tests/test_scrub.py +65 -0
- realuptime_errors-0.4.0/tests/test_wire_contract.py +90 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 RealUptime
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: realuptime-errors
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Zero-dependency error tracking SDK for Python (WSGI/ASGI), part of RealUptime Errors.
|
|
5
|
+
Author-email: RealUptime <support@realuptime.io>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://realuptime.io/error-tracking
|
|
8
|
+
Project-URL: Repository, https://github.com/RealUptimeHQ/realuptime-errors-py
|
|
9
|
+
Project-URL: Issues, https://github.com/RealUptimeHQ/realuptime-errors-py/issues
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# realuptime-errors
|
|
16
|
+
|
|
17
|
+
Zero-dependency error tracking SDK for Python (WSGI/ASGI middleware plus
|
|
18
|
+
manual capture): part of
|
|
19
|
+
[RealUptime Errors](https://realuptime.io/error-tracking).
|
|
20
|
+
|
|
21
|
+
This is a **mirror**. It is published from `packages/errors-py` in the
|
|
22
|
+
[realuptime monorepo](https://github.com/RealUptimeHQ/realuptime) by
|
|
23
|
+
`scripts/publish-sdk-mirrors.mjs` and is not edited directly; open issues
|
|
24
|
+
and PRs against this repo, but expect source changes to land here after
|
|
25
|
+
they merge upstream.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Installable from the package registry (primary) or straight from this mirror's git history (e.g. to pin an exact commit).
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install realuptime-errors
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# or, straight from this mirror
|
|
37
|
+
pip install "git+https://github.com/RealUptimeHQ/realuptime-errors-py"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
import realuptime_errors
|
|
44
|
+
|
|
45
|
+
realuptime_errors.init(
|
|
46
|
+
dsn="https://realuptime.io/api/errors/v1/ingest/rue_...", # from your project's dashboard
|
|
47
|
+
release="v2.4.1",
|
|
48
|
+
environment="production",
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
realuptime_errors.capture_exception(some_exception)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
WSGI: `app = realuptime_errors.WsgiMiddleware(app)`
|
|
55
|
+
ASGI: `app = realuptime_errors.AsgiMiddleware(app)`
|
|
56
|
+
|
|
57
|
+
## What this SDK actually does
|
|
58
|
+
|
|
59
|
+
- **Never raises out of a public function.** Every entry point catches
|
|
60
|
+
everything; a broken SDK logs once to stderr (prefixed
|
|
61
|
+
`[realuptime-errors]`) and goes quiet. An error tracker that crashes the
|
|
62
|
+
app it watches is worse than none.
|
|
63
|
+
- **Scrubs PII by default, client-side**, before anything serializes:
|
|
64
|
+
`Authorization`/`Proxy-Authorization`/`Cookie`/`Set-Cookie` headers are
|
|
65
|
+
replaced whole; card-shaped digit runs (Luhn-checked), JWTs, prefixed API
|
|
66
|
+
keys, and long hex/base64 runs are pattern-scrubbed anywhere they appear
|
|
67
|
+
in the message, request context, breadcrumbs, or captured source lines.
|
|
68
|
+
Opt one field back in with `allow_fields=["x-request-id"]`; there is no
|
|
69
|
+
global "disable scrubbing" switch, by design.
|
|
70
|
+
- **Never silently drops.** The in-memory buffer (200 events) evicts the
|
|
71
|
+
oldest event when full, counts every eviction, and reports the count on
|
|
72
|
+
the next successful batch, so drops show up on your dashboard instead of
|
|
73
|
+
disappearing.
|
|
74
|
+
- **Standard library only.** No third-party imports, ever, checked by a
|
|
75
|
+
test in this repo (`tests/test_wire_contract.py`) that scans the source
|
|
76
|
+
for anything outside an explicit allow-list.
|
|
77
|
+
|
|
78
|
+
## API
|
|
79
|
+
|
|
80
|
+
| Function | Notes |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `init(dsn, release=None, environment=None, allow_fields=None, capture_unhandled=True)` | Installs a `sys.excepthook` for unhandled exceptions unless `capture_unhandled=False`. Safe to call twice; a missing DSN logs once and stays inert. |
|
|
83
|
+
| `capture_exception(exc, request=None, fingerprint=None, release=None, environment=None)` | Reports an exception. |
|
|
84
|
+
| `capture_message(message, ...)` | Reports a plain message. |
|
|
85
|
+
| `add_breadcrumb(message, category=None, data=None)` | Bounded trail (last 20), rides the next event. |
|
|
86
|
+
| `flush()` | Delivers anything buffered. |
|
|
87
|
+
| `WsgiMiddleware(app)` / `AsgiMiddleware(app)` | Captures unhandled exceptions with minimal request context (method, path), then re-raises. |
|
|
88
|
+
|
|
89
|
+
## Version
|
|
90
|
+
|
|
91
|
+
This mirror tracks SDK_VERSION `0.4.0` in `realuptime_errors.py`, the
|
|
92
|
+
string every event actually carries on the wire.
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT, see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# realuptime-errors
|
|
2
|
+
|
|
3
|
+
Zero-dependency error tracking SDK for Python (WSGI/ASGI middleware plus
|
|
4
|
+
manual capture): part of
|
|
5
|
+
[RealUptime Errors](https://realuptime.io/error-tracking).
|
|
6
|
+
|
|
7
|
+
This is a **mirror**. It is published from `packages/errors-py` in the
|
|
8
|
+
[realuptime monorepo](https://github.com/RealUptimeHQ/realuptime) by
|
|
9
|
+
`scripts/publish-sdk-mirrors.mjs` and is not edited directly; open issues
|
|
10
|
+
and PRs against this repo, but expect source changes to land here after
|
|
11
|
+
they merge upstream.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Installable from the package registry (primary) or straight from this mirror's git history (e.g. to pin an exact commit).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install realuptime-errors
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# or, straight from this mirror
|
|
23
|
+
pip install "git+https://github.com/RealUptimeHQ/realuptime-errors-py"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
import realuptime_errors
|
|
30
|
+
|
|
31
|
+
realuptime_errors.init(
|
|
32
|
+
dsn="https://realuptime.io/api/errors/v1/ingest/rue_...", # from your project's dashboard
|
|
33
|
+
release="v2.4.1",
|
|
34
|
+
environment="production",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
realuptime_errors.capture_exception(some_exception)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
WSGI: `app = realuptime_errors.WsgiMiddleware(app)`
|
|
41
|
+
ASGI: `app = realuptime_errors.AsgiMiddleware(app)`
|
|
42
|
+
|
|
43
|
+
## What this SDK actually does
|
|
44
|
+
|
|
45
|
+
- **Never raises out of a public function.** Every entry point catches
|
|
46
|
+
everything; a broken SDK logs once to stderr (prefixed
|
|
47
|
+
`[realuptime-errors]`) and goes quiet. An error tracker that crashes the
|
|
48
|
+
app it watches is worse than none.
|
|
49
|
+
- **Scrubs PII by default, client-side**, before anything serializes:
|
|
50
|
+
`Authorization`/`Proxy-Authorization`/`Cookie`/`Set-Cookie` headers are
|
|
51
|
+
replaced whole; card-shaped digit runs (Luhn-checked), JWTs, prefixed API
|
|
52
|
+
keys, and long hex/base64 runs are pattern-scrubbed anywhere they appear
|
|
53
|
+
in the message, request context, breadcrumbs, or captured source lines.
|
|
54
|
+
Opt one field back in with `allow_fields=["x-request-id"]`; there is no
|
|
55
|
+
global "disable scrubbing" switch, by design.
|
|
56
|
+
- **Never silently drops.** The in-memory buffer (200 events) evicts the
|
|
57
|
+
oldest event when full, counts every eviction, and reports the count on
|
|
58
|
+
the next successful batch, so drops show up on your dashboard instead of
|
|
59
|
+
disappearing.
|
|
60
|
+
- **Standard library only.** No third-party imports, ever, checked by a
|
|
61
|
+
test in this repo (`tests/test_wire_contract.py`) that scans the source
|
|
62
|
+
for anything outside an explicit allow-list.
|
|
63
|
+
|
|
64
|
+
## API
|
|
65
|
+
|
|
66
|
+
| Function | Notes |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| `init(dsn, release=None, environment=None, allow_fields=None, capture_unhandled=True)` | Installs a `sys.excepthook` for unhandled exceptions unless `capture_unhandled=False`. Safe to call twice; a missing DSN logs once and stays inert. |
|
|
69
|
+
| `capture_exception(exc, request=None, fingerprint=None, release=None, environment=None)` | Reports an exception. |
|
|
70
|
+
| `capture_message(message, ...)` | Reports a plain message. |
|
|
71
|
+
| `add_breadcrumb(message, category=None, data=None)` | Bounded trail (last 20), rides the next event. |
|
|
72
|
+
| `flush()` | Delivers anything buffered. |
|
|
73
|
+
| `WsgiMiddleware(app)` / `AsgiMiddleware(app)` | Captures unhandled exceptions with minimal request context (method, path), then re-raises. |
|
|
74
|
+
|
|
75
|
+
## Version
|
|
76
|
+
|
|
77
|
+
This mirror tracks SDK_VERSION `0.4.0` in `realuptime_errors.py`, the
|
|
78
|
+
string every event actually carries on the wire.
|
|
79
|
+
|
|
80
|
+
## License
|
|
81
|
+
|
|
82
|
+
MIT, see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "realuptime-errors"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "Zero-dependency error tracking SDK for Python (WSGI/ASGI), part of RealUptime Errors."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "RealUptime", email = "support@realuptime.io" }]
|
|
13
|
+
|
|
14
|
+
[project.urls]
|
|
15
|
+
Homepage = "https://realuptime.io/error-tracking"
|
|
16
|
+
Repository = "https://github.com/RealUptimeHQ/realuptime-errors-py"
|
|
17
|
+
Issues = "https://github.com/RealUptimeHQ/realuptime-errors-py/issues"
|
|
18
|
+
|
|
19
|
+
[tool.setuptools]
|
|
20
|
+
py-modules = ["realuptime_errors"]
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: realuptime-errors
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Zero-dependency error tracking SDK for Python (WSGI/ASGI), part of RealUptime Errors.
|
|
5
|
+
Author-email: RealUptime <support@realuptime.io>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://realuptime.io/error-tracking
|
|
8
|
+
Project-URL: Repository, https://github.com/RealUptimeHQ/realuptime-errors-py
|
|
9
|
+
Project-URL: Issues, https://github.com/RealUptimeHQ/realuptime-errors-py/issues
|
|
10
|
+
Requires-Python: >=3.8
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# realuptime-errors
|
|
16
|
+
|
|
17
|
+
Zero-dependency error tracking SDK for Python (WSGI/ASGI middleware plus
|
|
18
|
+
manual capture): part of
|
|
19
|
+
[RealUptime Errors](https://realuptime.io/error-tracking).
|
|
20
|
+
|
|
21
|
+
This is a **mirror**. It is published from `packages/errors-py` in the
|
|
22
|
+
[realuptime monorepo](https://github.com/RealUptimeHQ/realuptime) by
|
|
23
|
+
`scripts/publish-sdk-mirrors.mjs` and is not edited directly; open issues
|
|
24
|
+
and PRs against this repo, but expect source changes to land here after
|
|
25
|
+
they merge upstream.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
Installable from the package registry (primary) or straight from this mirror's git history (e.g. to pin an exact commit).
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install realuptime-errors
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# or, straight from this mirror
|
|
37
|
+
pip install "git+https://github.com/RealUptimeHQ/realuptime-errors-py"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```python
|
|
43
|
+
import realuptime_errors
|
|
44
|
+
|
|
45
|
+
realuptime_errors.init(
|
|
46
|
+
dsn="https://realuptime.io/api/errors/v1/ingest/rue_...", # from your project's dashboard
|
|
47
|
+
release="v2.4.1",
|
|
48
|
+
environment="production",
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
realuptime_errors.capture_exception(some_exception)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
WSGI: `app = realuptime_errors.WsgiMiddleware(app)`
|
|
55
|
+
ASGI: `app = realuptime_errors.AsgiMiddleware(app)`
|
|
56
|
+
|
|
57
|
+
## What this SDK actually does
|
|
58
|
+
|
|
59
|
+
- **Never raises out of a public function.** Every entry point catches
|
|
60
|
+
everything; a broken SDK logs once to stderr (prefixed
|
|
61
|
+
`[realuptime-errors]`) and goes quiet. An error tracker that crashes the
|
|
62
|
+
app it watches is worse than none.
|
|
63
|
+
- **Scrubs PII by default, client-side**, before anything serializes:
|
|
64
|
+
`Authorization`/`Proxy-Authorization`/`Cookie`/`Set-Cookie` headers are
|
|
65
|
+
replaced whole; card-shaped digit runs (Luhn-checked), JWTs, prefixed API
|
|
66
|
+
keys, and long hex/base64 runs are pattern-scrubbed anywhere they appear
|
|
67
|
+
in the message, request context, breadcrumbs, or captured source lines.
|
|
68
|
+
Opt one field back in with `allow_fields=["x-request-id"]`; there is no
|
|
69
|
+
global "disable scrubbing" switch, by design.
|
|
70
|
+
- **Never silently drops.** The in-memory buffer (200 events) evicts the
|
|
71
|
+
oldest event when full, counts every eviction, and reports the count on
|
|
72
|
+
the next successful batch, so drops show up on your dashboard instead of
|
|
73
|
+
disappearing.
|
|
74
|
+
- **Standard library only.** No third-party imports, ever, checked by a
|
|
75
|
+
test in this repo (`tests/test_wire_contract.py`) that scans the source
|
|
76
|
+
for anything outside an explicit allow-list.
|
|
77
|
+
|
|
78
|
+
## API
|
|
79
|
+
|
|
80
|
+
| Function | Notes |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `init(dsn, release=None, environment=None, allow_fields=None, capture_unhandled=True)` | Installs a `sys.excepthook` for unhandled exceptions unless `capture_unhandled=False`. Safe to call twice; a missing DSN logs once and stays inert. |
|
|
83
|
+
| `capture_exception(exc, request=None, fingerprint=None, release=None, environment=None)` | Reports an exception. |
|
|
84
|
+
| `capture_message(message, ...)` | Reports a plain message. |
|
|
85
|
+
| `add_breadcrumb(message, category=None, data=None)` | Bounded trail (last 20), rides the next event. |
|
|
86
|
+
| `flush()` | Delivers anything buffered. |
|
|
87
|
+
| `WsgiMiddleware(app)` / `AsgiMiddleware(app)` | Captures unhandled exceptions with minimal request context (method, path), then re-raises. |
|
|
88
|
+
|
|
89
|
+
## Version
|
|
90
|
+
|
|
91
|
+
This mirror tracks SDK_VERSION `0.4.0` in `realuptime_errors.py`, the
|
|
92
|
+
string every event actually carries on the wire.
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
MIT, see [LICENSE](./LICENSE).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
realuptime_errors.py
|
|
5
|
+
realuptime_errors.egg-info/PKG-INFO
|
|
6
|
+
realuptime_errors.egg-info/SOURCES.txt
|
|
7
|
+
realuptime_errors.egg-info/dependency_links.txt
|
|
8
|
+
realuptime_errors.egg-info/top_level.txt
|
|
9
|
+
tests/test_client.py
|
|
10
|
+
tests/test_middleware.py
|
|
11
|
+
tests/test_scrub.py
|
|
12
|
+
tests/test_wire_contract.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
realuptime_errors
|