e-track 0.1.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.
- e_track-0.1.0/.gitignore +226 -0
- e_track-0.1.0/LICENSE +21 -0
- e_track-0.1.0/PKG-INFO +146 -0
- e_track-0.1.0/README.md +100 -0
- e_track-0.1.0/pyproject.toml +205 -0
- e_track-0.1.0/src/etrack/infra/config/base.py +69 -0
- e_track-0.1.0/src/etrack/infra/config/providers/adapters/bus/anyio.py +14 -0
- e_track-0.1.0/src/etrack/infra/config/providers/adapters/sink/live.py +17 -0
- e_track-0.1.0/src/etrack/infra/config/providers/drivers/sink/otlp.py +34 -0
- e_track-0.1.0/src/etrack/infra/errors.py +67 -0
- e_track-0.1.0/src/etrack/infra/logger.py +13 -0
- e_track-0.1.0/src/etrack/infra/proxy.py +24 -0
- e_track-0.1.0/src/etrack/infra/settings.py +70 -0
- e_track-0.1.0/src/etrack/logic/api.py +50 -0
- e_track-0.1.0/src/etrack/logic/channel.py +115 -0
- e_track-0.1.0/src/etrack/models/event.py +168 -0
- e_track-0.1.0/src/etrack/ops/file.py +145 -0
- e_track-0.1.0/src/etrack/ops/w3c.py +22 -0
- e_track-0.1.0/src/etrack/ports/bus.py +28 -0
- e_track-0.1.0/src/etrack/ports/provider.py +61 -0
- e_track-0.1.0/src/etrack/ports/sink.py +21 -0
- e_track-0.1.0/src/etrack/ports/source.py +54 -0
- e_track-0.1.0/src/etrack/ports/topology.py +50 -0
- e_track-0.1.0/src/etrack/processors/fold.py +167 -0
- e_track-0.1.0/src/etrack/processors/layout.py +102 -0
- e_track-0.1.0/src/etrack/providers/adapters/bus/anyio.py +161 -0
- e_track-0.1.0/src/etrack/providers/adapters/sink/live.py +141 -0
- e_track-0.1.0/src/etrack/providers/adapters/source/langgraph.py +428 -0
- e_track-0.1.0/src/etrack/providers/adapters/topology/langgraph.py +69 -0
- e_track-0.1.0/src/etrack/providers/drivers/sink/otlp.py +453 -0
- e_track-0.1.0/src/etrack/py.typed +0 -0
- e_track-0.1.0/tests/benchmark/etrack/logic/test_channel.py +29 -0
- e_track-0.1.0/tests/conftest.py +14 -0
- e_track-0.1.0/tests/integration/conftest.py +65 -0
- e_track-0.1.0/tests/integration/etrack/providers/drivers/sink/test_otlp.py +115 -0
- e_track-0.1.0/tests/resources/.gitkeep +0 -0
- e_track-0.1.0/tests/support/collector.py +58 -0
- e_track-0.1.0/tests/support/graph.py +12 -0
- e_track-0.1.0/tests/support/model.py +67 -0
- e_track-0.1.0/tests/support/sandbox.py +77 -0
- e_track-0.1.0/tests/unit/etrack/conftest.py +110 -0
- e_track-0.1.0/tests/unit/etrack/infra/test_errors.py +21 -0
- e_track-0.1.0/tests/unit/etrack/infra/test_logger.py +11 -0
- e_track-0.1.0/tests/unit/etrack/infra/test_proxy.py +13 -0
- e_track-0.1.0/tests/unit/etrack/infra/test_settings.py +33 -0
- e_track-0.1.0/tests/unit/etrack/logic/test_api.py +90 -0
- e_track-0.1.0/tests/unit/etrack/logic/test_channel.py +83 -0
- e_track-0.1.0/tests/unit/etrack/models/test_event.py +68 -0
- e_track-0.1.0/tests/unit/etrack/ops/test_file.py +60 -0
- e_track-0.1.0/tests/unit/etrack/ops/test_w3c.py +25 -0
- e_track-0.1.0/tests/unit/etrack/processors/test_fold.py +156 -0
- e_track-0.1.0/tests/unit/etrack/processors/test_layout.py +47 -0
- e_track-0.1.0/tests/unit/etrack/providers/adapters/bus/test_anyio.py +132 -0
- e_track-0.1.0/tests/unit/etrack/providers/adapters/sink/test_live.py +88 -0
- e_track-0.1.0/tests/unit/etrack/providers/adapters/source/test_langgraph.py +453 -0
- e_track-0.1.0/tests/unit/etrack/providers/adapters/topology/test_langgraph.py +53 -0
- e_track-0.1.0/tests/unit/etrack/providers/drivers/sink/test_otlp.py +239 -0
- e_track-0.1.0/tests/unit/test_descriptions.py +25 -0
- e_track-0.1.0/tests/unit/test_taxonomy.py +168 -0
e_track-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
221
|
+
|
|
222
|
+
# e-track
|
|
223
|
+
.sandbox/
|
|
224
|
+
.plans/
|
|
225
|
+
.serena/
|
|
226
|
+
.ty_cache/
|
e_track-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 EDamLabs
|
|
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 all
|
|
13
|
+
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.
|
e_track-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: e-track
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Run tracking for agent systems: one event model carried by a structlog channel, many parallel sinks (OTLP, live).
|
|
5
|
+
Project-URL: Homepage, https://github.com/edamlabs/e-track
|
|
6
|
+
Project-URL: Documentation, https://edamlabs.github.io/e-track/
|
|
7
|
+
Project-URL: Source, https://github.com/edamlabs/e-track
|
|
8
|
+
Project-URL: Issues, https://github.com/edamlabs/e-track/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/edamlabs/e-track/blob/main/CHANGELOG.md
|
|
10
|
+
Author: EDamLabs
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: agents,e-stack,langgraph,opentelemetry,structlog,tracing
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Framework :: AsyncIO
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: System :: Logging
|
|
22
|
+
Classifier: Topic :: System :: Monitoring
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.14
|
|
25
|
+
Requires-Dist: anyio>=4.6
|
|
26
|
+
Requires-Dist: msgspec>=0.21
|
|
27
|
+
Requires-Dist: pydantic-settings>=2.6
|
|
28
|
+
Requires-Dist: structlog>=26.1
|
|
29
|
+
Provides-Extra: all
|
|
30
|
+
Requires-Dist: e-serde>=0.6.2; extra == 'all'
|
|
31
|
+
Requires-Dist: langchain-core>=1.5.2; extra == 'all'
|
|
32
|
+
Requires-Dist: langgraph>=1.2.7; extra == 'all'
|
|
33
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.44; extra == 'all'
|
|
34
|
+
Requires-Dist: opentelemetry-sdk>=1.44; extra == 'all'
|
|
35
|
+
Requires-Dist: rustworkx>=0.17; extra == 'all'
|
|
36
|
+
Provides-Extra: langgraph
|
|
37
|
+
Requires-Dist: langchain-core>=1.5.2; extra == 'langgraph'
|
|
38
|
+
Requires-Dist: langgraph>=1.2.7; extra == 'langgraph'
|
|
39
|
+
Provides-Extra: otel
|
|
40
|
+
Requires-Dist: e-serde>=0.6.2; extra == 'otel'
|
|
41
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.44; extra == 'otel'
|
|
42
|
+
Requires-Dist: opentelemetry-sdk>=1.44; extra == 'otel'
|
|
43
|
+
Provides-Extra: topology
|
|
44
|
+
Requires-Dist: rustworkx>=0.17; extra == 'topology'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<a href="https://github.com/edamlabs/e-track/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/edamlabs/e-track/ci.yml?label=test" alt="CI"></a>
|
|
49
|
+
<a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/v/e-track?color=166b7e" alt="PyPI"></a>
|
|
50
|
+
<a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/pyversions/e-track" alt="Python"></a>
|
|
51
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/edamlabs/e-track?color=166b7e" alt="License"></a>
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<img src="assets/logo.svg" alt="e-track" height="110" />
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
Run tracking for agent systems. A source turns a framework's run into **one event model**; the model travels on a
|
|
59
|
+
**structlog channel** of its own; a bus fans it out to **parallel sinks**, each reading the partial view it declares.
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
framework hooks ─► source ─► fold ─► channel (validate → publish → forward to host logger)
|
|
63
|
+
│
|
|
64
|
+
└─► bus ─┬─► otlp spans + logs → Langfuse · LangSmith · Tempo · Phoenix
|
|
65
|
+
├─► live per-thread replay + push → a canvas, a chat
|
|
66
|
+
└─► yours any SinkPort, any EventView
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Part of the **EDamLabs eager series**: EDamLabs' own e- products ([EDamLabs families](https://github.com/edamlabs/e-workbench#identity)).
|
|
70
|
+
|
|
71
|
+
## Install
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv add "e-track[langgraph,otel]" # or: pip install "e-track[langgraph,otel]"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Extras: `langgraph` (LangGraph/deepagents source and topology), `otel` (OTLP driver), `topology` (layout), `all`.
|
|
78
|
+
Python 3.14+, typed (`py.typed`).
|
|
79
|
+
|
|
80
|
+
## Usage
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
from contextlib import AsyncExitStack
|
|
84
|
+
|
|
85
|
+
from etrack.logic.api import Tracker
|
|
86
|
+
from etrack.logic.channel import EventChannel
|
|
87
|
+
from etrack.models.event import EventKind
|
|
88
|
+
from etrack.providers.adapters.bus.anyio import AnyioAdapter
|
|
89
|
+
from etrack.providers.adapters.sink.live import LiveAdapter
|
|
90
|
+
from etrack.providers.adapters.source.langgraph import LanggraphSourceAdapter
|
|
91
|
+
from etrack.providers.drivers.sink.otlp import OtlpDriver
|
|
92
|
+
|
|
93
|
+
async with AsyncExitStack() as stack: # the host's composition root
|
|
94
|
+
live = await stack.enter_async_context(LiveAdapter())
|
|
95
|
+
otlp = await stack.enter_async_context(OtlpDriver())
|
|
96
|
+
bus = AnyioAdapter()
|
|
97
|
+
bus.subscribe(live)
|
|
98
|
+
bus.subscribe(otlp, select=lambda event: event if event.part is None else None) # policy per sink
|
|
99
|
+
await stack.enter_async_context(bus) # opened last: closed first, drains into the sinks
|
|
100
|
+
tracker = Tracker(EventChannel(bus), LanggraphSourceAdapter(mcp=frozenset({"onto_query"})))
|
|
101
|
+
|
|
102
|
+
with tracker.track(thread="t1", config={"configurable": {"thread_id": "t1"}}) as run:
|
|
103
|
+
await graph.ainvoke({"messages": [("user", "hola")]}, run.config)
|
|
104
|
+
with run.fold.span("gate", kind=EventKind.EVALUATION):
|
|
105
|
+
... # the project's own code, same tree
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
With the house renderer (`ELogger`) on the host:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
2026-11-03T12:00:00Z | INFO | run.event || run_id: 019a… || kind: node || phase: start || name: agent || step: 1
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Every frame is also a line on the host's `etrack` logger, rendered by the host's own structlog setup; e-track never
|
|
115
|
+
configures logging.
|
|
116
|
+
|
|
117
|
+
## The record
|
|
118
|
+
|
|
119
|
+
| Field | What |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `run_id`, `thread_id` | the run (32 hex, also the W3C trace id) and the conversation |
|
|
122
|
+
| `seq`, `id`, `parent` | order within the run; the span and its visible parent |
|
|
123
|
+
| `kind` | `run agent subagent node llm embedding retrieval tool mcp interrupt state evaluation custom` |
|
|
124
|
+
| `phase` | `start delta end error instant` |
|
|
125
|
+
| `part` | on deltas: `text reasoning tool_call image audio video file custom` |
|
|
126
|
+
| `node`, `ns`, `step`, `visit` | graph coordinates: node, subgraph path, superstep, times the run entered the node |
|
|
127
|
+
| `message_id`, `call_id` | the chat message and the tool call a client renders |
|
|
128
|
+
| `model`, `usage`, `error` | typed sections: provider/name/params, tokens/cost, failure |
|
|
129
|
+
| `payload`, `attributes` | what the span carried (redacted); the open, namespaced extension bag |
|
|
130
|
+
|
|
131
|
+
Grow it by subclassing `RunEvent` and passing the subclass to `EventChannel(model=…)`; read it through an `EventView`.
|
|
132
|
+
|
|
133
|
+
The full guide lives at [edamlabs.github.io/e-track](https://edamlabs.github.io/e-track/).
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
make install # sync deps + prek hooks
|
|
139
|
+
make check # lint + type + arch + validate + test
|
|
140
|
+
make cov # coverage gate: 100 % lines and branches, every outbound service faked in process
|
|
141
|
+
make integration # real services: the session fixtures bring sandbox/compose.yml up and down (collector + Phoenix)
|
|
142
|
+
make ci # every gate CI runs, in one command
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Stack: uv · ruff · ty · tach · pytest (xdist, randomly, pytest-docker) · prek · zizmor · Zensical · Renovate.
|
|
146
|
+
Released from a `v*` tag through PyPI trusted publishing; maintained by the [EDamLabs fleet](https://github.com/edamlabs/e-workbench).
|
e_track-0.1.0/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://github.com/edamlabs/e-track/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/edamlabs/e-track/ci.yml?label=test" alt="CI"></a>
|
|
3
|
+
<a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/v/e-track?color=166b7e" alt="PyPI"></a>
|
|
4
|
+
<a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/pyversions/e-track" alt="Python"></a>
|
|
5
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/edamlabs/e-track?color=166b7e" alt="License"></a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<img src="assets/logo.svg" alt="e-track" height="110" />
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
Run tracking for agent systems. A source turns a framework's run into **one event model**; the model travels on a
|
|
13
|
+
**structlog channel** of its own; a bus fans it out to **parallel sinks**, each reading the partial view it declares.
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
framework hooks ─► source ─► fold ─► channel (validate → publish → forward to host logger)
|
|
17
|
+
│
|
|
18
|
+
└─► bus ─┬─► otlp spans + logs → Langfuse · LangSmith · Tempo · Phoenix
|
|
19
|
+
├─► live per-thread replay + push → a canvas, a chat
|
|
20
|
+
└─► yours any SinkPort, any EventView
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Part of the **EDamLabs eager series**: EDamLabs' own e- products ([EDamLabs families](https://github.com/edamlabs/e-workbench#identity)).
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv add "e-track[langgraph,otel]" # or: pip install "e-track[langgraph,otel]"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Extras: `langgraph` (LangGraph/deepagents source and topology), `otel` (OTLP driver), `topology` (layout), `all`.
|
|
32
|
+
Python 3.14+, typed (`py.typed`).
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
```python
|
|
37
|
+
from contextlib import AsyncExitStack
|
|
38
|
+
|
|
39
|
+
from etrack.logic.api import Tracker
|
|
40
|
+
from etrack.logic.channel import EventChannel
|
|
41
|
+
from etrack.models.event import EventKind
|
|
42
|
+
from etrack.providers.adapters.bus.anyio import AnyioAdapter
|
|
43
|
+
from etrack.providers.adapters.sink.live import LiveAdapter
|
|
44
|
+
from etrack.providers.adapters.source.langgraph import LanggraphSourceAdapter
|
|
45
|
+
from etrack.providers.drivers.sink.otlp import OtlpDriver
|
|
46
|
+
|
|
47
|
+
async with AsyncExitStack() as stack: # the host's composition root
|
|
48
|
+
live = await stack.enter_async_context(LiveAdapter())
|
|
49
|
+
otlp = await stack.enter_async_context(OtlpDriver())
|
|
50
|
+
bus = AnyioAdapter()
|
|
51
|
+
bus.subscribe(live)
|
|
52
|
+
bus.subscribe(otlp, select=lambda event: event if event.part is None else None) # policy per sink
|
|
53
|
+
await stack.enter_async_context(bus) # opened last: closed first, drains into the sinks
|
|
54
|
+
tracker = Tracker(EventChannel(bus), LanggraphSourceAdapter(mcp=frozenset({"onto_query"})))
|
|
55
|
+
|
|
56
|
+
with tracker.track(thread="t1", config={"configurable": {"thread_id": "t1"}}) as run:
|
|
57
|
+
await graph.ainvoke({"messages": [("user", "hola")]}, run.config)
|
|
58
|
+
with run.fold.span("gate", kind=EventKind.EVALUATION):
|
|
59
|
+
... # the project's own code, same tree
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
With the house renderer (`ELogger`) on the host:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
2026-11-03T12:00:00Z | INFO | run.event || run_id: 019a… || kind: node || phase: start || name: agent || step: 1
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Every frame is also a line on the host's `etrack` logger, rendered by the host's own structlog setup; e-track never
|
|
69
|
+
configures logging.
|
|
70
|
+
|
|
71
|
+
## The record
|
|
72
|
+
|
|
73
|
+
| Field | What |
|
|
74
|
+
|---|---|
|
|
75
|
+
| `run_id`, `thread_id` | the run (32 hex, also the W3C trace id) and the conversation |
|
|
76
|
+
| `seq`, `id`, `parent` | order within the run; the span and its visible parent |
|
|
77
|
+
| `kind` | `run agent subagent node llm embedding retrieval tool mcp interrupt state evaluation custom` |
|
|
78
|
+
| `phase` | `start delta end error instant` |
|
|
79
|
+
| `part` | on deltas: `text reasoning tool_call image audio video file custom` |
|
|
80
|
+
| `node`, `ns`, `step`, `visit` | graph coordinates: node, subgraph path, superstep, times the run entered the node |
|
|
81
|
+
| `message_id`, `call_id` | the chat message and the tool call a client renders |
|
|
82
|
+
| `model`, `usage`, `error` | typed sections: provider/name/params, tokens/cost, failure |
|
|
83
|
+
| `payload`, `attributes` | what the span carried (redacted); the open, namespaced extension bag |
|
|
84
|
+
|
|
85
|
+
Grow it by subclassing `RunEvent` and passing the subclass to `EventChannel(model=…)`; read it through an `EventView`.
|
|
86
|
+
|
|
87
|
+
The full guide lives at [edamlabs.github.io/e-track](https://edamlabs.github.io/e-track/).
|
|
88
|
+
|
|
89
|
+
## Development
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
make install # sync deps + prek hooks
|
|
93
|
+
make check # lint + type + arch + validate + test
|
|
94
|
+
make cov # coverage gate: 100 % lines and branches, every outbound service faked in process
|
|
95
|
+
make integration # real services: the session fixtures bring sandbox/compose.yml up and down (collector + Phoenix)
|
|
96
|
+
make ci # every gate CI runs, in one command
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Stack: uv · ruff · ty · tach · pytest (xdist, randomly, pytest-docker) · prek · zizmor · Zensical · Renovate.
|
|
100
|
+
Released from a `v*` tag through PyPI trusted publishing; maintained by the [EDamLabs fleet](https://github.com/edamlabs/e-workbench).
|