ghosttrap-sdk 0.4.2__tar.gz → 0.4.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ghosttrap-sdk
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Drop-in error reporter for ghosttrap.io
5
5
  Project-URL: Homepage, https://github.com/alex-rowley/ghosttrap-sdk
6
6
  Requires-Python: >=3.10
@@ -25,12 +25,26 @@ ghosttrap.init("t_your_token_here")
25
25
 
26
26
  Get your token by running `ghosttrap setup` from [ghosttrap-cli](https://github.com/alex-rowley/ghosttrap-cli).
27
27
 
28
+ ### Optional kwargs
29
+
30
+ ```python
31
+ ghosttrap.init(
32
+ "t_your_token_here",
33
+ server="https://ghosttrap.io", # override only if self-hosting
34
+ send_user=False, # see "User context" below
35
+ )
36
+ ```
37
+
28
38
  ## What it hooks into
29
39
 
30
40
  - **`sys.excepthook`** — unhandled exceptions
31
41
  - **Python logging** — `logger.exception()` and `logger.error(..., exc_info=True)`
32
42
  - **Celery** — task failures via `celery.signals.task_failure` (auto-detected)
33
43
 
44
+ ## What it sends
45
+
46
+ Every report includes the exception type, message, traceback, frames (file/line/function/code), and the server's hostname (`socket.gethostname()`).
47
+
34
48
  ## Django
35
49
 
36
50
  ```python
@@ -45,6 +59,14 @@ MIDDLEWARE = [
45
59
  ]
46
60
  ```
47
61
 
62
+ ## User context
63
+
64
+ Off by default. Pass `send_user=True` to `init()` and the Django middleware will attach the authenticated user's `id` and `username` to each report. Has no effect outside Django.
65
+
66
+ ```python
67
+ ghosttrap.init("t_your_token_here", send_user=True)
68
+ ```
69
+
48
70
  ## Zero dependencies
49
71
 
50
72
  Pure Python stdlib. No transitive dependencies in your production image.
@@ -17,12 +17,26 @@ ghosttrap.init("t_your_token_here")
17
17
 
18
18
  Get your token by running `ghosttrap setup` from [ghosttrap-cli](https://github.com/alex-rowley/ghosttrap-cli).
19
19
 
20
+ ### Optional kwargs
21
+
22
+ ```python
23
+ ghosttrap.init(
24
+ "t_your_token_here",
25
+ server="https://ghosttrap.io", # override only if self-hosting
26
+ send_user=False, # see "User context" below
27
+ )
28
+ ```
29
+
20
30
  ## What it hooks into
21
31
 
22
32
  - **`sys.excepthook`** — unhandled exceptions
23
33
  - **Python logging** — `logger.exception()` and `logger.error(..., exc_info=True)`
24
34
  - **Celery** — task failures via `celery.signals.task_failure` (auto-detected)
25
35
 
36
+ ## What it sends
37
+
38
+ Every report includes the exception type, message, traceback, frames (file/line/function/code), and the server's hostname (`socket.gethostname()`).
39
+
26
40
  ## Django
27
41
 
28
42
  ```python
@@ -37,6 +51,14 @@ MIDDLEWARE = [
37
51
  ]
38
52
  ```
39
53
 
54
+ ## User context
55
+
56
+ Off by default. Pass `send_user=True` to `init()` and the Django middleware will attach the authenticated user's `id` and `username` to each report. Has no effect outside Django.
57
+
58
+ ```python
59
+ ghosttrap.init("t_your_token_here", send_user=True)
60
+ ```
61
+
40
62
  ## Zero dependencies
41
63
 
42
64
  Pure Python stdlib. No transitive dependencies in your production image.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ghosttrap-sdk
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Drop-in error reporter for ghosttrap.io
5
5
  Project-URL: Homepage, https://github.com/alex-rowley/ghosttrap-sdk
6
6
  Requires-Python: >=3.10
@@ -25,12 +25,26 @@ ghosttrap.init("t_your_token_here")
25
25
 
26
26
  Get your token by running `ghosttrap setup` from [ghosttrap-cli](https://github.com/alex-rowley/ghosttrap-cli).
27
27
 
28
+ ### Optional kwargs
29
+
30
+ ```python
31
+ ghosttrap.init(
32
+ "t_your_token_here",
33
+ server="https://ghosttrap.io", # override only if self-hosting
34
+ send_user=False, # see "User context" below
35
+ )
36
+ ```
37
+
28
38
  ## What it hooks into
29
39
 
30
40
  - **`sys.excepthook`** — unhandled exceptions
31
41
  - **Python logging** — `logger.exception()` and `logger.error(..., exc_info=True)`
32
42
  - **Celery** — task failures via `celery.signals.task_failure` (auto-detected)
33
43
 
44
+ ## What it sends
45
+
46
+ Every report includes the exception type, message, traceback, frames (file/line/function/code), and the server's hostname (`socket.gethostname()`).
47
+
34
48
  ## Django
35
49
 
36
50
  ```python
@@ -45,6 +59,14 @@ MIDDLEWARE = [
45
59
  ]
46
60
  ```
47
61
 
62
+ ## User context
63
+
64
+ Off by default. Pass `send_user=True` to `init()` and the Django middleware will attach the authenticated user's `id` and `username` to each report. Has no effect outside Django.
65
+
66
+ ```python
67
+ ghosttrap.init("t_your_token_here", send_user=True)
68
+ ```
69
+
48
70
  ## Zero dependencies
49
71
 
50
72
  Pure Python stdlib. No transitive dependencies in your production image.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ghosttrap-sdk"
7
- version = "0.4.2"
7
+ version = "0.4.3"
8
8
  description = "Drop-in error reporter for ghosttrap.io"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes