Skip to main content

agentship-observability

The OpenTelemetry implementation of AgentShip's Observer port (Phase 07).

The contract — the Observer/Span port, SpanKind/Usage, the frozen SEMCONV span-name and attribute-key constants, and the TraceView read-port — lives in agentship-core with no OTel dependency, so an engine or eval hook can read a trace with only the kernel installed (design §4.6).

This package holds only the pipeline:

  • otel/observer.pyOTelObserver, the concrete port over a TracerProvider: it builds the canonical span tree (§4.1), sets GenAI attributes (§4.2), and rolls up cost/tokens/latency.
  • exporters/ — one SpanProcessor per backend (console, phoenix, langfuse, langsmith), all reached over OTLP/HTTP (no per-vendor SDK lock-in).
  • litellm_callback.py — one process-global CustomLogger that stamps cost/tokens/latency onto the current model span, so every LiteLLM caller is covered without per-call wiring.
  • config.py + factory.py — the observability: config surface and the process-global TracerProvider the factory memoises; provider: otel (default) → OTelObserver, none → NoOp.
  • capture.py — the record/replay hook that stamps agentship.replay.request_hash (+ gated request/response) so P12 can build deterministic cassettes.
  • studio.pygenerate_langgraph_json + the loopback-only, dev-token studio launcher.

Everything a price table, trace store, or UI would provide is consumed (Phoenix/Langfuse/ LangSmith + LangGraph Studio); we build only the composition.

Conformance guards (we keep thin, but prove it conforms)

Two pieces are deliberately vendor-free — the semantic-convention key constants and the RecordingObserver — because the kernel cannot import OpenTelemetry (design §4.6) and the base install ships without a collector. To keep them from silently drifting from the real thing, each is continuously proven against upstream:

  • tests/test_semconv_upstream.py asserts every gen_ai.* / llm.* key equals the OTel-GenAI / OpenInference string it claims to speak.
  • tests/test_observer_parity.py runs one interaction through both the in-memory RecordingObserver and the real OTelObserver, and asserts the two produce the same span tree and model-span attributes.

See docs/decisions/0001-integrate-not-invent.md for the full rationale.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentship_observability-0.0.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentship_observability-0.0.2-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file agentship_observability-0.0.2.tar.gz.

File metadata

  • Download URL: agentship_observability-0.0.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agentship_observability-0.0.2.tar.gz
Algorithm Hash digest
SHA256 03c4066065504dd2b03ea3fbc5682b838c7969566dff7d01f219c1a776f54645
MD5 5e2b78a70159b1c27cd905cc88e51578
BLAKE2b-256 d558fd574df6ad6d00f384707fd4c46b1f9ae527066afee17b46c9b7a531edbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentship_observability-0.0.2.tar.gz:

Publisher: release.yml on Agent-Ship/agent-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentship_observability-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for agentship_observability-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 935a8c590f2fc491b12f1325e72a476f0731ad72f419a175ae0d2caa35919dee
MD5 62a967a7e782941a5f8bc5ca950b92fa
BLAKE2b-256 fd6ff156a55ffe12cd77de17f005bdd091a4ca5a243e33a21e1d8e77b856cc0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentship_observability-0.0.2-py3-none-any.whl:

Publisher: release.yml on Agent-Ship/agent-ship

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page