struct-sdk 0.5.23__tar.gz → 0.5.25__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 (43) hide show
  1. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/PKG-INFO +1 -1
  2. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/pyproject.toml +1 -1
  3. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/core.py +14 -4
  4. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/.gitignore +0 -0
  5. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/LICENSE +0 -0
  6. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/README.md +0 -0
  7. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/__init__.py +0 -0
  8. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_auto.py +0 -0
  9. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_container.py +0 -0
  10. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_distro.py +0 -0
  11. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_event_loop.py +0 -0
  12. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_fork_safe_http.py +0 -0
  13. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_genai_content.py +0 -0
  14. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_metrics.py +0 -0
  15. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/__init__.py +0 -0
  16. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/config.py +0 -0
  17. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/export.py +0 -0
  18. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/health.py +0 -0
  19. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/identity.py +0 -0
  20. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/otlp_sender.py +0 -0
  21. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/outputs.py +0 -0
  22. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/poller.py +0 -0
  23. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/providers.py +0 -0
  24. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/runtime.py +0 -0
  25. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/self_metrics.py +0 -0
  26. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_observations/snapshot.py +0 -0
  27. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_operation_details.py +0 -0
  28. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/_pool.py +0 -0
  29. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/ag2.py +0 -0
  30. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/anthropic.py +0 -0
  31. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/autogen.py +0 -0
  32. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/claude_agent.py +0 -0
  33. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/crewai.py +0 -0
  34. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/gcp.py +0 -0
  35. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/google_genai.py +0 -0
  36. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/langchain.py +0 -0
  37. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/litellm.py +0 -0
  38. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/llamaindex.py +0 -0
  39. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/mcp.py +0 -0
  40. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/openai.py +0 -0
  41. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/openai_agents.py +0 -0
  42. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/src/struct_sdk/pydantic_ai.py +0 -0
  43. {struct_sdk-0.5.23 → struct_sdk-0.5.25}/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.5.23
3
+ Version: 0.5.25
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "struct-sdk"
7
- version = "0.5.23"
7
+ version = "0.5.25"
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"
@@ -750,19 +750,29 @@ class _StructBatchSpanProcessor(BatchSpanProcessor):
750
750
  """Queues inside the export scope, so a full queue is reported at DEBUG
751
751
  like Struct's other export faults; host processors are unaffected."""
752
752
 
753
- def on_end(self, span: ReadableSpan) -> None:
753
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
754
+ # Resolve at setup: importing in a callback re-imports inside Temporal sandboxes.
755
+ # snapshot imports core._redacted, so this cannot be a module-level import.
754
756
  from struct_sdk._observations.snapshot import is_capture_scope
755
- if is_capture_scope(span.instrumentation_scope):
757
+ self._is_capture_scope = is_capture_scope
758
+ super().__init__(*args, **kwargs)
759
+
760
+ def on_end(self, span: ReadableSpan) -> None:
761
+ if self._is_capture_scope(span.instrumentation_scope):
756
762
  return
757
763
  with _struct_export_scope():
758
764
  super().on_end(span)
759
765
 
760
766
 
761
767
  class _StructBatchLogRecordProcessor(BatchLogRecordProcessor):
762
- def on_emit(self, *args: Any, **kwargs: Any) -> Any:
768
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
763
769
  from struct_sdk._observations.snapshot import is_capture_scope
770
+ self._is_capture_scope = is_capture_scope
771
+ super().__init__(*args, **kwargs)
772
+
773
+ def on_emit(self, *args: Any, **kwargs: Any) -> Any:
764
774
  record = args[0] if args else kwargs.get("log_record")
765
- if is_capture_scope(getattr(record, "instrumentation_scope", None)):
775
+ if self._is_capture_scope(getattr(record, "instrumentation_scope", None)):
766
776
  return None
767
777
  with _struct_export_scope():
768
778
  return super().on_emit(*args, **kwargs) # type: ignore[misc]
File without changes
File without changes
File without changes