struct-sdk 0.4.14__tar.gz → 0.4.15__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.
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/PKG-INFO +10 -3
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/README.md +9 -2
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/pyproject.toml +10 -1
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/_auto.py +4 -2
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/.gitignore +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/LICENSE +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/__init__.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/_distro.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/_genai_content.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/_operation_details.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/ag2.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/anthropic.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/autogen.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/claude_agent.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/core.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/crewai.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/gcp.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/google_genai.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/langchain.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/litellm.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/llamaindex.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/mcp.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/openai.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/openai_agents.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/pydantic_ai.py +0 -0
- {struct_sdk-0.4.14 → struct_sdk-0.4.15}/src/struct_sdk/temporal.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: struct-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.15
|
|
4
4
|
Summary: Struct agent observability SDK — auto-instruments AI agent frameworks with OpenTelemetry
|
|
5
5
|
Project-URL: Homepage, https://struct.ai
|
|
6
6
|
Project-URL: Documentation, https://struct.ai/docs
|
|
@@ -862,6 +862,12 @@ before `init()`, call the contrib instrumentor directly (for example
|
|
|
862
862
|
| Logs | Python `logging` records that reach the root logger, with trace context. The SDK's own and OpenTelemetry's records are excluded. With the `[structlog]` extra, structlog events that structlog writes itself (its default) are exported with their fields as attributes; events structlog hands to `logging` (`structlog.stdlib.LoggerFactory`) are exported once, through the `logging` bridge. Extras and structlog fields OpenTelemetry can't take as-is are exported as strings: dicts and mixed-type lists as JSON, everything else (UUIDs, datetimes, `None`, bytes) as its `str()`. Your other handlers still see the original values. With the `[exceptions]` extra, uncaught exceptions (main thread, other threads, asyncio) are exported as log records. If your app configures no logging, its warnings still print to stderr as they would without Struct. This is separate from `content_capture`, which only governs LLM content; disable `{"logging": {"enabled": False}}` and `{"structlog": {"enabled": False}}` (which also stops copies of your logs when Struct attaches to your OpenTelemetry setup), or redact attributes, if application logs can carry sensitive data. |
|
|
863
863
|
| Metrics | Instrumentor metrics (for example `http.server.duration`) and process metrics (`process.cpu.*`, `process.memory.*`, threads, file descriptors, GC). Counters and histograms use delta temporality. |
|
|
864
864
|
|
|
865
|
+
AWS calls through boto3/botocore or aiobotocore become one span per API
|
|
866
|
+
operation (for example `S3.PutObject`), retries included, and carry the X-Ray
|
|
867
|
+
header AWS services propagate. When Struct attaches to your existing
|
|
868
|
+
OpenTelemetry setup, it instruments nothing, so AWS operation spans reach
|
|
869
|
+
Struct only if your setup instruments botocore itself.
|
|
870
|
+
|
|
865
871
|
Each instrumentor activates only when its library is installed.
|
|
866
872
|
`instrumentation_options` disables or configures one by name; other keys are
|
|
867
873
|
passed to that instrumentor:
|
|
@@ -894,8 +900,9 @@ them.
|
|
|
894
900
|
### Datadog ddtrace
|
|
895
901
|
|
|
896
902
|
Under `ddtrace-run`, Struct leaves the libraries ddtrace patches to it, and
|
|
897
|
-
`urllib3` beneath `requests` or `botocore
|
|
898
|
-
|
|
903
|
+
`urllib3` beneath `requests` or `botocore` (and `aiobotocore` when ddtrace
|
|
904
|
+
patches `botocore`), to avoid duplicate spans and conflicting trace headers,
|
|
905
|
+
and logs one INFO line listing them. Logs, process metrics, thread context, AI spans and libraries
|
|
899
906
|
ddtrace doesn't patch still go to Struct. With `DD_TRACE_OTEL_ENABLED=true`,
|
|
900
907
|
ddtrace's OpenTelemetry provider isn't the OpenTelemetry SDK, so full-app
|
|
901
908
|
mode attaches nothing (an INFO line says so) and only AI spans reach Struct.
|
|
@@ -746,6 +746,12 @@ before `init()`, call the contrib instrumentor directly (for example
|
|
|
746
746
|
| Logs | Python `logging` records that reach the root logger, with trace context. The SDK's own and OpenTelemetry's records are excluded. With the `[structlog]` extra, structlog events that structlog writes itself (its default) are exported with their fields as attributes; events structlog hands to `logging` (`structlog.stdlib.LoggerFactory`) are exported once, through the `logging` bridge. Extras and structlog fields OpenTelemetry can't take as-is are exported as strings: dicts and mixed-type lists as JSON, everything else (UUIDs, datetimes, `None`, bytes) as its `str()`. Your other handlers still see the original values. With the `[exceptions]` extra, uncaught exceptions (main thread, other threads, asyncio) are exported as log records. If your app configures no logging, its warnings still print to stderr as they would without Struct. This is separate from `content_capture`, which only governs LLM content; disable `{"logging": {"enabled": False}}` and `{"structlog": {"enabled": False}}` (which also stops copies of your logs when Struct attaches to your OpenTelemetry setup), or redact attributes, if application logs can carry sensitive data. |
|
|
747
747
|
| Metrics | Instrumentor metrics (for example `http.server.duration`) and process metrics (`process.cpu.*`, `process.memory.*`, threads, file descriptors, GC). Counters and histograms use delta temporality. |
|
|
748
748
|
|
|
749
|
+
AWS calls through boto3/botocore or aiobotocore become one span per API
|
|
750
|
+
operation (for example `S3.PutObject`), retries included, and carry the X-Ray
|
|
751
|
+
header AWS services propagate. When Struct attaches to your existing
|
|
752
|
+
OpenTelemetry setup, it instruments nothing, so AWS operation spans reach
|
|
753
|
+
Struct only if your setup instruments botocore itself.
|
|
754
|
+
|
|
749
755
|
Each instrumentor activates only when its library is installed.
|
|
750
756
|
`instrumentation_options` disables or configures one by name; other keys are
|
|
751
757
|
passed to that instrumentor:
|
|
@@ -778,8 +784,9 @@ them.
|
|
|
778
784
|
### Datadog ddtrace
|
|
779
785
|
|
|
780
786
|
Under `ddtrace-run`, Struct leaves the libraries ddtrace patches to it, and
|
|
781
|
-
`urllib3` beneath `requests` or `botocore
|
|
782
|
-
|
|
787
|
+
`urllib3` beneath `requests` or `botocore` (and `aiobotocore` when ddtrace
|
|
788
|
+
patches `botocore`), to avoid duplicate spans and conflicting trace headers,
|
|
789
|
+
and logs one INFO line listing them. Logs, process metrics, thread context, AI spans and libraries
|
|
783
790
|
ddtrace doesn't patch still go to Struct. With `DD_TRACE_OTEL_ENABLED=true`,
|
|
784
791
|
ddtrace's OpenTelemetry provider isn't the OpenTelemetry SDK, so full-app
|
|
785
792
|
mode attaches nothing (an INFO line says so) and only AI spans reach Struct.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "struct-sdk"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.15"
|
|
8
8
|
description = "Struct agent observability SDK — auto-instruments AI agent frameworks with OpenTelemetry"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -218,6 +218,15 @@ dev = [
|
|
|
218
218
|
"google-cloud-bigquery>=3.30.0",
|
|
219
219
|
"opentelemetry-instrumentation-grpc",
|
|
220
220
|
"opentelemetry-propagator-b3",
|
|
221
|
+
# AWS client-operation suite (tests/test_aws_client_operations.py): real
|
|
222
|
+
# boto3 and aiobotocore clients, contrib's botocore instrumentor and the
|
|
223
|
+
# transport instrumentors beneath them (urllib3, aiohttp-client), against
|
|
224
|
+
# a local endpoint.
|
|
225
|
+
"boto3",
|
|
226
|
+
"aiobotocore",
|
|
227
|
+
"opentelemetry-instrumentation-botocore",
|
|
228
|
+
"opentelemetry-instrumentation-urllib3",
|
|
229
|
+
"opentelemetry-instrumentation-aiohttp-client",
|
|
221
230
|
]
|
|
222
231
|
# The openai<3 suites: `uv run --no-default-groups --group openai2 pytest
|
|
223
232
|
# tests/test_litellm.py tests/test_llamaindex.py` (pnpm run test:openai2).
|
|
@@ -132,8 +132,10 @@ _DDTRACE_INTEGRATIONS = {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
# Transports beneath clients ddtrace patches: instrumenting one would overwrite
|
|
135
|
-
# the traceparent ddtrace wrote on the same request.
|
|
136
|
-
|
|
135
|
+
# the traceparent ddtrace wrote on the same request. contrib's aiobotocore
|
|
136
|
+
# instrumentor also wraps botocore's Endpoint.prepare_request, so it would write
|
|
137
|
+
# Struct's X-Ray header on every botocore request ddtrace traces.
|
|
138
|
+
_TRANSPORT_BENEATH = {"urllib3": ("requests", "botocore"), "aiobotocore": ("botocore",)}
|
|
137
139
|
|
|
138
140
|
# Non-entry-point options handled here rather than by a contrib instrumentor.
|
|
139
141
|
LOGGING = "logging"
|
|
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
|
|
File without changes
|
|
File without changes
|