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.py—OTelObserver, the concrete port over aTracerProvider: it builds the canonical span tree (§4.1), sets GenAI attributes (§4.2), and rolls up cost/tokens/latency.exporters/— oneSpanProcessorper backend (console,phoenix,langfuse,langsmith), all reached over OTLP/HTTP (no per-vendor SDK lock-in).litellm_callback.py— one process-globalCustomLoggerthat stamps cost/tokens/latency onto the currentmodelspan, so every LiteLLM caller is covered without per-call wiring.config.py+factory.py— theobservability:config surface and the process-globalTracerProviderthe factory memoises;provider: otel(default) →OTelObserver,none→ NoOp.capture.py— the record/replay hook that stampsagentship.replay.request_hash(+ gated request/response) so P12 can build deterministic cassettes.studio.py—generate_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.pyasserts everygen_ai.*/llm.*key equals the OTel-GenAI / OpenInference string it claims to speak.tests/test_observer_parity.pyruns one interaction through both the in-memoryRecordingObserverand the realOTelObserver, 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03c4066065504dd2b03ea3fbc5682b838c7969566dff7d01f219c1a776f54645
|
|
| MD5 |
5e2b78a70159b1c27cd905cc88e51578
|
|
| BLAKE2b-256 |
d558fd574df6ad6d00f384707fd4c46b1f9ae527066afee17b46c9b7a531edbf
|
Provenance
The following attestation bundles were made for agentship_observability-0.0.2.tar.gz:
Publisher:
release.yml on Agent-Ship/agent-ship
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentship_observability-0.0.2.tar.gz -
Subject digest:
03c4066065504dd2b03ea3fbc5682b838c7969566dff7d01f219c1a776f54645 - Sigstore transparency entry: 2753231504
- Sigstore integration time:
-
Permalink:
Agent-Ship/agent-ship@62da5aef4b6b7ebef8111e1b020a0064973a71f2 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Agent-Ship
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62da5aef4b6b7ebef8111e1b020a0064973a71f2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentship_observability-0.0.2-py3-none-any.whl.
File metadata
- Download URL: agentship_observability-0.0.2-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
935a8c590f2fc491b12f1325e72a476f0731ad72f419a175ae0d2caa35919dee
|
|
| MD5 |
62a967a7e782941a5f8bc5ca950b92fa
|
|
| BLAKE2b-256 |
fd6ff156a55ffe12cd77de17f005bdd091a4ca5a243e33a21e1d8e77b856cc0b
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentship_observability-0.0.2-py3-none-any.whl -
Subject digest:
935a8c590f2fc491b12f1325e72a476f0731ad72f419a175ae0d2caa35919dee - Sigstore transparency entry: 2753231551
- Sigstore integration time:
-
Permalink:
Agent-Ship/agent-ship@62da5aef4b6b7ebef8111e1b020a0064973a71f2 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/Agent-Ship
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@62da5aef4b6b7ebef8111e1b020a0064973a71f2 -
Trigger Event:
push
-
Statement type: