traceact 0.2.1__tar.gz → 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.
Files changed (46) hide show
  1. {traceact-0.2.1/traceact.egg-info → traceact-0.4.0}/PKG-INFO +25 -2
  2. {traceact-0.2.1 → traceact-0.4.0}/README.md +24 -1
  3. traceact-0.4.0/USAGE.md +1480 -0
  4. {traceact-0.2.1 → traceact-0.4.0}/pyproject.toml +5 -1
  5. traceact-0.4.0/tests/test_async_sink.py +212 -0
  6. traceact-0.4.0/tests/test_decorators.py +146 -0
  7. traceact-0.4.0/tests/test_doctor.py +85 -0
  8. traceact-0.4.0/tests/test_http_sink.py +148 -0
  9. traceact-0.4.0/tests/test_otlp_sink.py +464 -0
  10. traceact-0.4.0/tests/test_reader.py +109 -0
  11. traceact-0.4.0/tests/test_redaction.py +141 -0
  12. traceact-0.4.0/tests/test_sinks.py +69 -0
  13. traceact-0.4.0/tests/test_sqlite_sink.py +172 -0
  14. traceact-0.4.0/tests/test_tracelog.py +466 -0
  15. traceact-0.4.0/traceact/__init__.py +82 -0
  16. {traceact-0.2.1 → traceact-0.4.0}/traceact/config.py +36 -0
  17. {traceact-0.2.1 → traceact-0.4.0}/traceact/decorators.py +61 -12
  18. traceact-0.4.0/traceact/log.py +421 -0
  19. traceact-0.4.0/traceact/redaction.py +63 -0
  20. traceact-0.4.0/traceact/sinks.py +1260 -0
  21. {traceact-0.2.1 → traceact-0.4.0}/traceact/trace.py +67 -22
  22. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/cli.py +48 -0
  23. traceact-0.4.0/traceact/viewer/doctor.py +184 -0
  24. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/server.py +13 -0
  25. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/static/app.js +194 -4
  26. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/static/index.html +28 -1
  27. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/static/styles.css +98 -6
  28. {traceact-0.2.1 → traceact-0.4.0/traceact.egg-info}/PKG-INFO +25 -2
  29. {traceact-0.2.1 → traceact-0.4.0}/traceact.egg-info/SOURCES.txt +13 -0
  30. traceact-0.2.1/USAGE.md +0 -861
  31. traceact-0.2.1/traceact/__init__.py +0 -46
  32. traceact-0.2.1/traceact/sinks.py +0 -481
  33. {traceact-0.2.1 → traceact-0.4.0}/LICENSE +0 -0
  34. {traceact-0.2.1 → traceact-0.4.0}/MANIFEST.in +0 -0
  35. {traceact-0.2.1 → traceact-0.4.0}/setup.cfg +0 -0
  36. {traceact-0.2.1 → traceact-0.4.0}/traceact/budget.py +0 -0
  37. {traceact-0.2.1 → traceact-0.4.0}/traceact/context.py +0 -0
  38. {traceact-0.2.1 → traceact-0.4.0}/traceact/helpers.py +0 -0
  39. {traceact-0.2.1 → traceact-0.4.0}/traceact/ids.py +0 -0
  40. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/__init__.py +0 -0
  41. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/instance.py +0 -0
  42. {traceact-0.2.1 → traceact-0.4.0}/traceact/viewer/reader.py +0 -0
  43. {traceact-0.2.1 → traceact-0.4.0}/traceact.egg-info/dependency_links.txt +0 -0
  44. {traceact-0.2.1 → traceact-0.4.0}/traceact.egg-info/entry_points.txt +0 -0
  45. {traceact-0.2.1 → traceact-0.4.0}/traceact.egg-info/requires.txt +0 -0
  46. {traceact-0.2.1 → traceact-0.4.0}/traceact.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: traceact
3
- Version: 0.2.1
3
+ Version: 0.4.0
4
4
  Summary: X-ray vision for your code. Lightweight action-level tracing for Python.
5
5
  Author: Mohammed Shehu
6
6
  License-Expression: MIT
@@ -127,6 +127,14 @@ The source modal (click the source name in the header) lets you:
127
127
  - **Drag and drop** a `.jsonl` file — saved as a static snapshot in `~/.traceact/imports/`
128
128
  - **Type a path** — collapsible fallback for pasting an absolute path
129
129
 
130
+ ### Health checks
131
+
132
+ ```bash
133
+ traceact doctor [SOURCE]
134
+ ```
135
+
136
+ Checks Python version, that `~/.traceact` is writable, whether a viewer is already running, and (if `SOURCE` is given) that the file or folder parses as valid trace data. Useful for ruling out setup problems before debugging your own code. The same checks are also available from the viewer itself — Settings > **Run diagnostics**. See [USAGE.md](USAGE.md#viewing-traces) for full output and exit-code details.
137
+
130
138
  ## Concepts
131
139
 
132
140
  | Concept | Meaning |
@@ -135,7 +143,15 @@ The source modal (click the source name in the header) lets you:
135
143
  | `Step` | A human-readable timeline marker within a trace |
136
144
  | `Event` | A structured operation: db, http, file, model, job, etc. |
137
145
  | `Touch` | A resource involved in the trace (auto-derived from events) |
138
- | `Sink` | Where completed traces are written (`JsonlSink`, `ConsoleSink`) |
146
+ | `Sink` | Where completed traces are written (`JsonlSink`, `ConsoleSink`, `AsyncSink`) |
147
+
148
+ ### Design principle: observable by choice, never forced blind
149
+
150
+ TraceAct exists to give you X-ray vision for your code. That means nothing TraceAct does itself should take that vision away.
151
+
152
+ Wherever TraceAct might skip, drop, or truncate data — a trace sampled out by `sample_rate`, events truncated by a budget limit, records dropped by `AsyncSink` under backpressure — there is always an observable signal. The `budget_hit` flag marks truncated traces. The `AsyncSink.dropped` counter counts every dropped record. Sampling decisions are made before a trace object is created, so nothing is half-recorded.
153
+
154
+ The design choice is always: **silent by default, observable by choice**. You decide whether to log, alert on, or ignore those signals. TraceAct never makes that decision for you.
139
155
 
140
156
  ## Wiring into a web app
141
157
 
@@ -174,6 +190,13 @@ document.getElementById("btn-viewer").addEventListener("click", async () => {
174
190
 
175
191
  Python 3.9+. No runtime dependencies.
176
192
 
193
+ ## Development
194
+
195
+ ```bash
196
+ pip install -e ".[dev]"
197
+ pytest
198
+ ```
199
+
177
200
  ## Full reference
178
201
 
179
202
  See [USAGE.md](USAGE.md) for complete API documentation: all decorator and context manager parameters, helper methods (`trace.db`, `trace.http`, `trace.file`, `trace.model`), input capture, parent/child traces, sinks, budget configuration, the trace record schema, test isolation, and the full viewer server API.
@@ -97,6 +97,14 @@ The source modal (click the source name in the header) lets you:
97
97
  - **Drag and drop** a `.jsonl` file — saved as a static snapshot in `~/.traceact/imports/`
98
98
  - **Type a path** — collapsible fallback for pasting an absolute path
99
99
 
100
+ ### Health checks
101
+
102
+ ```bash
103
+ traceact doctor [SOURCE]
104
+ ```
105
+
106
+ Checks Python version, that `~/.traceact` is writable, whether a viewer is already running, and (if `SOURCE` is given) that the file or folder parses as valid trace data. Useful for ruling out setup problems before debugging your own code. The same checks are also available from the viewer itself — Settings > **Run diagnostics**. See [USAGE.md](USAGE.md#viewing-traces) for full output and exit-code details.
107
+
100
108
  ## Concepts
101
109
 
102
110
  | Concept | Meaning |
@@ -105,7 +113,15 @@ The source modal (click the source name in the header) lets you:
105
113
  | `Step` | A human-readable timeline marker within a trace |
106
114
  | `Event` | A structured operation: db, http, file, model, job, etc. |
107
115
  | `Touch` | A resource involved in the trace (auto-derived from events) |
108
- | `Sink` | Where completed traces are written (`JsonlSink`, `ConsoleSink`) |
116
+ | `Sink` | Where completed traces are written (`JsonlSink`, `ConsoleSink`, `AsyncSink`) |
117
+
118
+ ### Design principle: observable by choice, never forced blind
119
+
120
+ TraceAct exists to give you X-ray vision for your code. That means nothing TraceAct does itself should take that vision away.
121
+
122
+ Wherever TraceAct might skip, drop, or truncate data — a trace sampled out by `sample_rate`, events truncated by a budget limit, records dropped by `AsyncSink` under backpressure — there is always an observable signal. The `budget_hit` flag marks truncated traces. The `AsyncSink.dropped` counter counts every dropped record. Sampling decisions are made before a trace object is created, so nothing is half-recorded.
123
+
124
+ The design choice is always: **silent by default, observable by choice**. You decide whether to log, alert on, or ignore those signals. TraceAct never makes that decision for you.
109
125
 
110
126
  ## Wiring into a web app
111
127
 
@@ -144,6 +160,13 @@ document.getElementById("btn-viewer").addEventListener("click", async () => {
144
160
 
145
161
  Python 3.9+. No runtime dependencies.
146
162
 
163
+ ## Development
164
+
165
+ ```bash
166
+ pip install -e ".[dev]"
167
+ pytest
168
+ ```
169
+
147
170
  ## Full reference
148
171
 
149
172
  See [USAGE.md](USAGE.md) for complete API documentation: all decorator and context manager parameters, helper methods (`trace.db`, `trace.http`, `trace.file`, `trace.model`), input capture, parent/child traces, sinks, budget configuration, the trace record schema, test isolation, and the full viewer server API.