Skip to main content

Uptimes Agents — OpenTelemetry-based observability for AI agents. Three-line init, ships to local uptimes-monitor or direct to api.uptimes.ai.

Project description

uptimes-agents (Python)

OpenTelemetry-based observability SDK for AI agents — three-line install, ships to the local uptimes-monitor daemon or direct to api.uptimes.ai.

Install

pip install uptimes-agents
# Add provider extras for auto-instrumentation:
pip install 'uptimes-agents[anthropic]'    # or [openai], or [all]

Quick start

import uptimes_agents
import anthropic

uptimes_agents.init(service_name="rca-agent")

client = anthropic.Anthropic()
client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=256,
    messages=[{"role": "user", "content": "hi"}],
)
# → one chat span lands in your Uptimes dashboard within ~5s.

Custom spans

For non-LLM work — init() activates auto-instrumentation for known provider SDKs; for everything else, wrap your code in a span:

with uptimes_agents.span("execute_plan", hypothesis="db_slow"):
    ...
    uptimes_agents.current_span().set_attribute("steps_taken", 4)

Configuration

Arg / env var Default Notes
service_name (kwarg) required Becomes agent_name in Uptimes
endpoint / UPTIMES_OTLP_ENDPOINT http://localhost:4318 OTLP/HTTP target
api_key / UPTIMES_API_KEY none Required only on direct-to-cloud
resource_attributes {} Extra OTel resource attrs
auto_instrument_providers True Set False to manage your own instrumentations

Standard OTel env vars (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) are honored — drop-in for existing OTel-instrumented apps.

Routing modes

Default is via the local monitor: spans go to http://localhost:4318 on the host. uptimes-monitor enriches them with host context, batches, and forwards over a single TLS connection to api.uptimes.ai. No API key needed in your app — the monitor's token stamps org_id.

For containerised environments without a host daemon, point straight at the cloud:

uptimes_agents.init(
    service_name="my-agent",
    endpoint="https://api.uptimes.ai/v1/traces/otlp",
    api_key="<your-org-token>",
)

What gets captured

Auto-instrumentation produces OTel-GenAI spans for every Anthropic / OpenAI LLM call:

  • Provider, model, token usage, cost
  • Latency, time-to-first-chunk, stop reason
  • Tool calls (when the provider returns tool_use content)
  • Input / output content (governable via OTel content-capture toggles)

Custom span(...) blocks produce regular OTel spans you can group by name in the dashboard.

Versioning

V0.1 — Anthropic + OpenAI auto-instrumentation. Bedrock / Vertex / Gemini land in V0.2.

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

uptimes_agents-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

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

uptimes_agents-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file uptimes_agents-0.1.2.tar.gz.

File metadata

  • Download URL: uptimes_agents-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uptimes_agents-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1e69ad8989b136b20cee1fd28c6f3f3c3d28de32e3f58c911fc23b7de0dde288
MD5 fe7a34a226a976eb599200a83772293a
BLAKE2b-256 3c9a4aa57805805cf1abb745d4d998e18ddb71ce58eaabd34ab425c98d7f093e

See more details on using hashes here.

File details

Details for the file uptimes_agents-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: uptimes_agents-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uptimes_agents-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a4cd4feeefefbcc22e281d03ea9016a3ea3fd6a6b3af2d9ab7c6a0a86bbb1f24
MD5 a7b3eba5cf291122361f75a9576fa1ba
BLAKE2b-256 11f97b77cae5f3fa7f573568614c7170d1d929ccd6685d0e954b05ff905950c2

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