Skip to main content

xyberos-observability (M10)

Observability/telemetry exporters for Xyberos. Turns the runtime's event stream into traces and metrics for OpenTelemetry, Prometheus, Langfuse, and Sentry — satisfying RFC-0019 Track L, milestone M10.

Install

pip install -e ./observability

Optional extras:

pip install -e "./observability[otel]"      # opentelemetry-sdk (in-memory spans by default)
pip install -e "./observability[prometheus]"# prometheus-client
pip install -e "./observability[sentry]"    # sentry-sdk

How it works

Xyberos emits events (runtime.request_started, brain.response_produced, memory.stored, ...) on its EventBus. This plugin attaches an EventRecorder that forwards each event to the configured exporters:

Exporter Destination What it does
OpenTelemetryExporter OTel span pipeline One span per event, named event.name, with event.* attributes (plus event.prompt). Defaults to an InMemorySpanExporter so traces are inspectable without a collector.
PrometheusExporter Prometheus registry xyberos_events_total{event="..."} counter, one per event name.
LangfuseExporter Langfuse /api/public/ingestion One observation-create item per event with name, input (prompt) and output (event data). Basic auth with public_key:secret_key.
SentryExporter Sentry SDK Adds a breadcrumb per event; captures a message for failures (runtime.request_failed, brain.error).

Usage

from xyberos import create_app
from xyberos_observability import ObservabilityPlugin, OpenTelemetryExporter

app = create_app()
app.load_plugin(ObservabilityPlugin(exporters=[OpenTelemetryExporter()]))

reply = app.chat("hello")          # emits events -> spans

Select exporters by environment variable (comma-separated) instead:

export OBSERVABILITY_EXPORTERS=otel,prometheus,langfuse,sentry
from xyberos_observability import ObservabilityPlugin

app.load_plugin(ObservabilityPlugin())

For Langfuse, set LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY and LANGFUSE_HOST (defaults https://cloud.langfuse.com).

Example

python examples/trace_a_chat.py                       # inspect in-memory spans
python examples/trace_a_chat.py --prometheus          # also track a counter
python examples/trace_a_chat.py --langfuse            # POST traces to Langfuse

Tests

python -m pytest observability/tests -q

Tests use injectable transports / in-memory exporters, so nothing touches the network or a real collector. The DoD test (tests/test_plugin.py) runs app.chat(...) and asserts a trace lands in OTel and Langfuse.

Download files

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

Source Distribution

xyberos_observability-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

xyberos_observability-0.1.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file xyberos_observability-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for xyberos_observability-0.1.0.tar.gz
Algorithm Hash digest
SHA256 78c2cc361f23c0e26b8194f285d3c0a85be9e6959a8adcc0f99f7ba6c335f500
MD5 ea4fb7913dc0624de1c43ea04dc1f732
BLAKE2b-256 b3df149005bdc3aa8f8cd47dd5cead1e9f9278beadcd858030ce7c24df2bcb3c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_observability-0.1.0.tar.gz:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

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

File details

Details for the file xyberos_observability-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for xyberos_observability-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cd82afe4b60078b9297da17a662bf36dfec7abd0dc1eb21bce2d6d73874d1c2
MD5 5e013416c8c7d6d51d825049598caedd
BLAKE2b-256 5d828178050d32e0c4c7eae8bc7c8c83dc89b708690bab1c915117ca51a2ad9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xyberos_observability-0.1.0-py3-none-any.whl:

Publisher: pypi-plugins.yml on xyberos/xyberos-plugins

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.1.0 This release

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