agentmark-sdk 0.2.0__tar.gz → 0.2.1__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.
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/CHANGELOG.md +21 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/PKG-INFO +1 -1
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/pyproject.toml +1 -1
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/config.py +1 -1
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/otlp_json_exporter.py +8 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/.gitignore +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/package.json +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/__init__.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/decorator.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/masking_processor.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/pii_masker.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/py.typed +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/sampler.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/sdk.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/serialize.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/src/agentmark_sdk/trace.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/__init__.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_decorator.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_masking_processor.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_otlp_json_exporter.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_pii_masker.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_sampler.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_sdk.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_serialize.py +0 -0
- {agentmark_sdk-0.2.0 → agentmark_sdk-0.2.1}/tests/test_trace.py +0 -0
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 0.2.1 (2026-04-16)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- fix: set explicit User-Agent on OTLP span exports to bypass Cloudflare BIC ([#584](https://github.com/agentmark-ai/agentmark/pull/584))
|
|
6
|
+
|
|
7
|
+
Cloudflare's Browser Integrity Check rejects requests bearing the default
|
|
8
|
+
`Python-urllib/*` User-Agent with HTTP 403 (error code 1010). `JsonOtlpSpanExporter`
|
|
9
|
+
uses `urllib.request.urlopen` without setting a UA, so every trace export through
|
|
10
|
+
a Cloudflare-proxied zone (api.agentmark.co, api-stg.agentmark.co) was silently
|
|
11
|
+
rejected before reaching the gateway. Combined with the exporter's bare
|
|
12
|
+
`except Exception: return FAILURE`, the failure produced no logs, no metrics,
|
|
13
|
+
and no ClickHouse rows — just a complete absence of traces.
|
|
14
|
+
|
|
15
|
+
The `ApiLoader` path (`/v1/templates` etc.) wasn't affected because it uses
|
|
16
|
+
`httpx`, whose default UA `python-httpx/<version>` isn't on the BIC block list.
|
|
17
|
+
|
|
18
|
+
Set `User-Agent: agentmark-sdk-python/<version>` on every outbound POST. The
|
|
19
|
+
version is resolved at import time via `importlib.metadata.version("agentmark-sdk")`
|
|
20
|
+
so it stays in lockstep with the installed distribution.
|
|
21
|
+
|
|
1
22
|
## 0.2.0 (2026-04-13)
|
|
2
23
|
|
|
3
24
|
### 🚀 Features
|
|
@@ -15,12 +15,19 @@ import base64
|
|
|
15
15
|
import json
|
|
16
16
|
import urllib.request
|
|
17
17
|
from collections import defaultdict
|
|
18
|
+
from importlib.metadata import version as _pkg_version
|
|
18
19
|
from typing import Any, Sequence
|
|
19
20
|
|
|
20
21
|
from opentelemetry.sdk.trace import ReadableSpan
|
|
21
22
|
from opentelemetry.sdk.trace.export import SpanExporter, SpanExportResult
|
|
22
23
|
from opentelemetry.trace import SpanKind
|
|
23
24
|
|
|
25
|
+
# Cloudflare Browser Integrity Check rejects the default urllib User-Agent
|
|
26
|
+
# ("Python-urllib/x.y") with a 403 error code 1010. Set an explicit SDK UA so
|
|
27
|
+
# requests through proxied zones (api.agentmark.co et al) aren't blocked
|
|
28
|
+
# before reaching the gateway.
|
|
29
|
+
_SDK_USER_AGENT = f"agentmark-sdk-python/{_pkg_version('agentmark-sdk')}"
|
|
30
|
+
|
|
24
31
|
# OTLP wire format uses 1-indexed SpanKind values (UNSPECIFIED=0,
|
|
25
32
|
# INTERNAL=1, SERVER=2, ...) while the Python API uses 0-indexed
|
|
26
33
|
# (INTERNAL=0, SERVER=1, ...). This mapping is stable per the OTLP spec.
|
|
@@ -50,6 +57,7 @@ class JsonOtlpSpanExporter(SpanExporter):
|
|
|
50
57
|
data=payload,
|
|
51
58
|
headers={
|
|
52
59
|
"Content-Type": "application/json",
|
|
60
|
+
"User-Agent": _SDK_USER_AGENT,
|
|
53
61
|
**self._headers,
|
|
54
62
|
},
|
|
55
63
|
method="POST",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|