Skip to main content

IOA Observability SDK

Project description

Observe-SDK

PyPI version

IOA observability SDK for your multi-agentic application.

Table of Contents

Installation

To install the package via PyPI, simply run:

pip install ioa_observe_sdk

Alternatively, to download the SDK from git, you could also use the following command. Ensure you have uv installed in your environment.

uv add "git+https://github.com/agntcy/observe"

Schema

The AGNTCY observability schema is an extension of the OTel LLM Semantic Conventions for Generative AI systems. This schema is designed to provide comprehensive observability for Multi-Agent Systems (MAS).

Link: AGNTCY Observability Schema

Dev

Any Opentelemetry compatible backend can be used, but for this guide, we will use ClickhouseDB as the backend database.

Opentelemetry collector

The OpenTelemetry Collector offers a vendor-agnostic implementation of how to receive, process and export telemetry data. It removes the need to run, operate, and maintain multiple agents/collectors.

Clickhouse DB

ClickhouseDB is used as a backend database to store and query the collected telemetry data efficiently, enabling you to analyze and visualize observability information for your multi-agentic applications.

Grafana (optional)

Grafana can be used to visualize the telemetry data collected by the OpenTelemetry Collector and stored in ClickhouseDB.

To get started with development, start a Clickhouse DB and an OTel collector container locally using docker-compose like so:

cd deploy/
docker compose up -d

Running both locally allows you to test, monitor, and debug your observability setup in a development environment before deploying to production.

Ensure the contents of otel-collector.yaml is correct.

Check the logs of the collector to ensure it is running correctly:

docker logs -f otel-collector

Viewing data in Clickhouse DB can be done using the Clickhouse client. The collector is configured to export telemetry data to Clickhouse.

The clickhouse exporter creates various tables in the Clickhouse DB, including otel_traces, which is used to store trace data.

For more info, refer to the OpenTelemetry Clickhouse Exporter documentation

docker exec -it clickhouse-server clickhouse-client

select * from otel_traces LIMIT 10;

Create a .env file with the following content:

OTLP_HTTP_ENDPOINT=http://localhost:4318

Install the dependencies and activate the virtual environment:

set -a
source .env
set +a

python3 -m venv .venv
source .venv/bin/activate
uv sync

Testing

To run the unit tests, ensure you have the OPENAI_API_KEY set in your environment. You can run the tests using the following command:

OPENAI_API_KEY=<KEY> make test

🚀 Getting Started

For getting started with the SDK, please refer to the Getting Started file. It contains detailed instructions on how to set up and use the SDK effectively.

Grafana

To configure Grafana to visualize the telemetry data, follow these steps:

  1. Spin up Grafana locally using Docker:
docker run -d -p 3000:3000 --name=grafana grafana/grafana
  1. Access Grafana by navigating to http://localhost:3000 in your web browser.

    • Default username: admin
    • Default password: admin
  2. Add a new data source:

    • Choose "ClickHouse" as the data source type.
    • Set the URL to http://0.0.0.0:8123.
    • Configure the authentication settings if necessary.
    • Save and test the connection to ensure it works correctly.

Refer to the Grafana ClickHouse plugin documentation for more details on configuring ClickHouse as a data source.

Contributing

Contributions are welcome! Please follow these steps to contribute:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Commit your changes (git commit -am 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Create a new Pull Request.

Project details


Download files

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

Source Distribution

ioa_observe_sdk-1.0.11.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

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

ioa_observe_sdk-1.0.11-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file ioa_observe_sdk-1.0.11.tar.gz.

File metadata

  • Download URL: ioa_observe_sdk-1.0.11.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ioa_observe_sdk-1.0.11.tar.gz
Algorithm Hash digest
SHA256 b482e97dbbf26a18c8f1703e7f837cb9a0a2c5e61351faf4a12194c378f03ddb
MD5 44c063e93c046cf8bcf9db51e57381a2
BLAKE2b-256 8cd20e5f6a54877559489857c0434197e94b1fb4303766cb75a76b5cc099423e

See more details on using hashes here.

File details

Details for the file ioa_observe_sdk-1.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for ioa_observe_sdk-1.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 979b5ef7b929365b7ffdcb801344c838f2c0ee662f0fdf22d268d5e8e0ecdd16
MD5 d20600d75382b8d839c5d259233dbadd
BLAKE2b-256 6c21efe3a4a70cac2126b35a4d7ee6409e9f3e7cf34558a1bb4cb63bf4d9cdc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page