rootmark 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.
- {rootmark-0.1.1 → rootmark-0.1.2}/CHANGELOG.md +54 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/PKG-INFO +6 -1
- {rootmark-0.1.1 → rootmark-0.1.2}/README.md +5 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/pyproject.toml +58 -58
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/core/emitter.py +725 -650
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/boto3_interceptor.py +639 -624
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_span_lifecycle.py +356 -255
- {rootmark-0.1.1 → rootmark-0.1.2}/.gitignore +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/audit/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/audit/hashing.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/config.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/core/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/core/lifecycle.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/core/processor.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/core/step.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/_bedrock_helpers.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/agentcore.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/crewai.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/langchain.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/openai.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/strands.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/strands_multiagent.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/patches/strands_session.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/schema/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/src/rootmark/schema/trace_event.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/core/test_emitter_bind_context.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/core/test_emitter_session.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/core/test_processor_envelope.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/integration/conftest.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/integration/test_strands_e2e.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/patches/__init__.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/patches/test_agentcore.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/patches/test_strands.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_boto3_interceptor.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_config_override.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_crewai_patch.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_langchain_handler.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_roundtrip_ingestion.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_span_tags.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_step_contract.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_strands_agent_live.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_strands_multiagent.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_strands_multiagent_live.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_strands_patch.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_strands_session.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_suppress_payloads.py +0 -0
- {rootmark-0.1.1 → rootmark-0.1.2}/tests/test_trace_and_span.py +0 -0
|
@@ -3,6 +3,60 @@
|
|
|
3
3
|
Notable changes to the `rootmark` SDK. Versions follow the collector's own
|
|
4
4
|
releases loosely; where the two must match, it says so.
|
|
5
5
|
|
|
6
|
+
## 0.1.2
|
|
7
|
+
|
|
8
|
+
**Fixes a defect in 0.1.1 that stopped runs ever completing.** Upgrade from
|
|
9
|
+
0.1.1; there is no reason to stay on it.
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **A discarded span held its run open for ever.** 0.1.1 made `start_span`
|
|
14
|
+
write a provisional row, but `discard_span` still emitted nothing -- correct
|
|
15
|
+
when a discarded span had never been mentioned, wrong once it had. The
|
|
16
|
+
provisional row said `running` and nothing superseded it, and a run is
|
|
17
|
+
finished only when all of its spans are. Every run containing a discarded
|
|
18
|
+
span therefore stayed in progress permanently.
|
|
19
|
+
|
|
20
|
+
It was not a corner case. The boto3 interceptor discards its span on *every*
|
|
21
|
+
Bedrock call made inside a Strands agent, because the Strands patch is
|
|
22
|
+
already tracing the same call. On the first deployment running both, 18 of
|
|
23
|
+
18 runs recorded after the upgrade were stuck "running" and none could ever
|
|
24
|
+
complete.
|
|
25
|
+
|
|
26
|
+
Two changes, because one of them is a guarantee and the other is the right
|
|
27
|
+
shape:
|
|
28
|
+
|
|
29
|
+
* `discard_span` now **retracts** a span it announced, writing a terminal
|
|
30
|
+
`cancelled` row at the end sentinel. Any caller that announced a span can
|
|
31
|
+
discard it without stranding it. `cancelled` rather than `success`,
|
|
32
|
+
because nothing was measured -- a 0 ms success would be averaged in as a
|
|
33
|
+
real and very fast call -- and it is not an error, so error rates are
|
|
34
|
+
untouched.
|
|
35
|
+
* `start_span` takes `announce=False` for a span opened speculatively, and
|
|
36
|
+
the boto3 interceptor uses it. A span that may turn out to belong to
|
|
37
|
+
another layer is no longer announced at open, so discarding it costs
|
|
38
|
+
nothing and leaves no `cancelled` row on every trace.
|
|
39
|
+
|
|
40
|
+
The cost of the second change: a bare Bedrock call made through boto3
|
|
41
|
+
*outside* a Strands agent is no longer visible while it runs, only once it
|
|
42
|
+
completes. Inside Strands -- the common case, and the one that was broken --
|
|
43
|
+
the agent span above it keeps in-progress visibility.
|
|
44
|
+
|
|
45
|
+
### Repairing existing data
|
|
46
|
+
|
|
47
|
+
Runs already stuck cannot fix themselves: their provisional rows will never be
|
|
48
|
+
superseded. Write the retraction the fixed code would have written -- a
|
|
49
|
+
`cancelled` row at `row_version` 2147483647 with the same `(project_id,
|
|
50
|
+
trace_id, start_time, span_id)` -- for every span matching
|
|
51
|
+
|
|
52
|
+
```sql
|
|
53
|
+
SELECT * FROM trace_events FINAL
|
|
54
|
+
WHERE status NOT IN ('success','error','timeout','cancelled')
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
then re-project the affected runs. On the deployment above this moved 18 runs
|
|
58
|
+
from `running` to `success` and left no open spans.
|
|
59
|
+
|
|
6
60
|
## 0.1.1
|
|
7
61
|
|
|
8
62
|
**Upgrading from 0.1.0 requires a collector upgrade first.** See *Compatibility*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: rootmark
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Rootmark SDK -- agent instrumentation
|
|
5
5
|
Project-URL: Homepage, https://rootmark.dev
|
|
6
6
|
Project-URL: Documentation, https://rootmark.dev/docs/
|
|
@@ -59,6 +59,11 @@ Requires Python 3.12 or newer.
|
|
|
59
59
|
> Upgrade the collector first (it needs ClickHouse migrations `007`–`009`), or
|
|
60
60
|
> stay on 0.1.0.
|
|
61
61
|
|
|
62
|
+
> **0.1.1 is broken; use 0.1.2 or later.** In 0.1.1 a span that the SDK opened
|
|
63
|
+
> and then discarded was left looking like it was still running, which held its
|
|
64
|
+
> whole run open permanently. Any Bedrock call made through boto3 inside a
|
|
65
|
+
> Strands agent hits it, on every call.
|
|
66
|
+
|
|
62
67
|
## What changed in 0.1.1
|
|
63
68
|
|
|
64
69
|
- **Runs are visible while they are still going.** A span is recorded when it
|
|
@@ -21,6 +21,11 @@ Requires Python 3.12 or newer.
|
|
|
21
21
|
> Upgrade the collector first (it needs ClickHouse migrations `007`–`009`), or
|
|
22
22
|
> stay on 0.1.0.
|
|
23
23
|
|
|
24
|
+
> **0.1.1 is broken; use 0.1.2 or later.** In 0.1.1 a span that the SDK opened
|
|
25
|
+
> and then discarded was left looking like it was still running, which held its
|
|
26
|
+
> whole run open permanently. Any Bedrock call made through boto3 inside a
|
|
27
|
+
> Strands agent hits it, on every call.
|
|
28
|
+
|
|
24
29
|
## What changed in 0.1.1
|
|
25
30
|
|
|
26
31
|
- **Runs are visible while they are still going.** A span is recorded when it
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
[project]
|
|
2
|
-
name = "rootmark"
|
|
3
|
-
version = "0.1.
|
|
4
|
-
description = "Rootmark SDK -- agent instrumentation"
|
|
5
|
-
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.12"
|
|
7
|
-
# No licence declared as of 0.1.
|
|
8
|
-
# one the package defaults to all rights reserved -- see the 0.1.0 release
|
|
9
|
-
# commit (329e16c) for the reasoning and why it still needs revisiting.
|
|
10
|
-
keywords = ["agents", "observability", "tracing", "llm", "instrumentation"]
|
|
11
|
-
classifiers = [
|
|
12
|
-
"Development Status :: 4 - Beta",
|
|
13
|
-
"Intended Audience :: Developers",
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Programming Language :: Python :: 3.12",
|
|
16
|
-
"Programming Language :: Python :: 3.13",
|
|
17
|
-
"Programming Language :: Python :: 3.14",
|
|
18
|
-
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
-
"Topic :: System :: Monitoring",
|
|
20
|
-
"Typing :: Typed",
|
|
21
|
-
]
|
|
22
|
-
dependencies = [
|
|
23
|
-
"pydantic>=2.10.0",
|
|
24
|
-
"httpx>=0.28.0",
|
|
25
|
-
]
|
|
26
|
-
|
|
27
|
-
[project.urls]
|
|
28
|
-
Homepage = "https://rootmark.dev"
|
|
29
|
-
Documentation = "https://rootmark.dev/docs/"
|
|
30
|
-
Source = "https://github.com/IvanAdactic/rootmark"
|
|
31
|
-
|
|
32
|
-
[project.optional-dependencies]
|
|
33
|
-
# OpenAI integration (Group 4); tested with 1.x and 2.x
|
|
34
|
-
openai = ["openai>=1.40.0,<3"]
|
|
35
|
-
# LangChain callback handler (D4.7); BaseCallbackHandler is stable across 0.3.x and 1.x
|
|
36
|
-
langchain = ["langchain-core>=0.3,<2"]
|
|
37
|
-
# CrewAI event listeners (D5.6); BaseEventListener + crewai_event_bus (tested 0.86–1.x)
|
|
38
|
-
crewai = ["crewai>=0.86,<2"]
|
|
39
|
-
# Strands SDK / AWS Bedrock agent patch (D6.1)
|
|
40
|
-
strands = ["strands-agents>=1.26.0"]
|
|
41
|
-
# Boto3 / botocore interceptor for Bedrock zero-code-change path (D6.3)
|
|
42
|
-
boto3 = ["boto3>=1.35.0"]
|
|
43
|
-
dev = ["pytest>=8.0", "pytest-asyncio>=0.24", "openai>=1.40.0,<3", "langchain-core>=0.3,<2", "crewai>=0.86,<2"]
|
|
44
|
-
|
|
45
|
-
[build-system]
|
|
46
|
-
requires = ["hatchling"]
|
|
47
|
-
build-backend = "hatchling.build"
|
|
48
|
-
|
|
49
|
-
[tool.hatch.build.targets.wheel]
|
|
50
|
-
packages = ["src/rootmark"]
|
|
51
|
-
|
|
52
|
-
[tool.pytest.ini_options]
|
|
53
|
-
testpaths = ["tests"]
|
|
54
|
-
pythonpath = ["src"]
|
|
55
|
-
markers = [
|
|
56
|
-
"integration: needs docker-compose (API, worker, ClickHouse, Postgres)",
|
|
57
|
-
]
|
|
58
|
-
|
|
1
|
+
[project]
|
|
2
|
+
name = "rootmark"
|
|
3
|
+
version = "0.1.2"
|
|
4
|
+
description = "Rootmark SDK -- agent instrumentation"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
|
+
# No licence declared as of 0.1.2; to be added in a later release. Without
|
|
8
|
+
# one the package defaults to all rights reserved -- see the 0.1.0 release
|
|
9
|
+
# commit (329e16c) for the reasoning and why it still needs revisiting.
|
|
10
|
+
keywords = ["agents", "observability", "tracing", "llm", "instrumentation"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Development Status :: 4 - Beta",
|
|
13
|
+
"Intended Audience :: Developers",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.12",
|
|
16
|
+
"Programming Language :: Python :: 3.13",
|
|
17
|
+
"Programming Language :: Python :: 3.14",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
+
"Topic :: System :: Monitoring",
|
|
20
|
+
"Typing :: Typed",
|
|
21
|
+
]
|
|
22
|
+
dependencies = [
|
|
23
|
+
"pydantic>=2.10.0",
|
|
24
|
+
"httpx>=0.28.0",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.urls]
|
|
28
|
+
Homepage = "https://rootmark.dev"
|
|
29
|
+
Documentation = "https://rootmark.dev/docs/"
|
|
30
|
+
Source = "https://github.com/IvanAdactic/rootmark"
|
|
31
|
+
|
|
32
|
+
[project.optional-dependencies]
|
|
33
|
+
# OpenAI integration (Group 4); tested with 1.x and 2.x
|
|
34
|
+
openai = ["openai>=1.40.0,<3"]
|
|
35
|
+
# LangChain callback handler (D4.7); BaseCallbackHandler is stable across 0.3.x and 1.x
|
|
36
|
+
langchain = ["langchain-core>=0.3,<2"]
|
|
37
|
+
# CrewAI event listeners (D5.6); BaseEventListener + crewai_event_bus (tested 0.86–1.x)
|
|
38
|
+
crewai = ["crewai>=0.86,<2"]
|
|
39
|
+
# Strands SDK / AWS Bedrock agent patch (D6.1)
|
|
40
|
+
strands = ["strands-agents>=1.26.0"]
|
|
41
|
+
# Boto3 / botocore interceptor for Bedrock zero-code-change path (D6.3)
|
|
42
|
+
boto3 = ["boto3>=1.35.0"]
|
|
43
|
+
dev = ["pytest>=8.0", "pytest-asyncio>=0.24", "openai>=1.40.0,<3", "langchain-core>=0.3,<2", "crewai>=0.86,<2"]
|
|
44
|
+
|
|
45
|
+
[build-system]
|
|
46
|
+
requires = ["hatchling"]
|
|
47
|
+
build-backend = "hatchling.build"
|
|
48
|
+
|
|
49
|
+
[tool.hatch.build.targets.wheel]
|
|
50
|
+
packages = ["src/rootmark"]
|
|
51
|
+
|
|
52
|
+
[tool.pytest.ini_options]
|
|
53
|
+
testpaths = ["tests"]
|
|
54
|
+
pythonpath = ["src"]
|
|
55
|
+
markers = [
|
|
56
|
+
"integration: needs docker-compose (API, worker, ClickHouse, Postgres)",
|
|
57
|
+
]
|
|
58
|
+
|