Skip to main content

Exporter for Anthropic Agent SDK telemetry to Respan

Project description

Respan Exporter for Anthropic Agent SDK

respan.ai | Documentation

Exporter for Anthropic Agent SDK telemetry to Respan.

Quickstart

import asyncio
from claude_agent_sdk import ClaudeAgentOptions
from respan_exporter_anthropic_agents.respan_anthropic_agents_exporter import (
    RespanAnthropicAgentsExporter,
)

exporter = RespanAnthropicAgentsExporter()

async def main() -> None:
    options = exporter.with_options(
        options=ClaudeAgentOptions(
            allowed_tools=["Read", "Glob", "Grep"],
            permission_mode="acceptEdits",
        )
    )

    async for message in exporter.query(
        prompt="Analyze this repository and summarize architecture.",
        options=options,
    ):
        print(message)

asyncio.run(main())

Real Gateway Integration Test

Run the live integration test to verify:

  • Claude Agent SDK traffic goes through Respan gateway (no direct Anthropic key required).
  • Exporter uploads tracing payloads to real Respan ingest endpoint.

Required environment variables:

export RUN_REAL_GATEWAY_TEST=1
export RESPAN_API_KEY="your_respan_key"

Optional environment variables:

# Defaults to RESPAN_BASE_URL, KEYWORDSAI_BASE_URL, then https://api.respan.ai
export RESPAN_GATEWAY_BASE_URL="https://api.respan.ai"

# Optional Anthropic-compatible gateway base URL override
export RESPAN_ANTHROPIC_BASE_URL="https://api.respan.ai"

# Optional model override
export RESPAN_GATEWAY_MODEL="claude-sonnet-4-5"

Run test:

python -m unittest tests.test_real_gateway_integration -v

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

respan_exporter_anthropic_agents-1.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file respan_exporter_anthropic_agents-1.0.2.tar.gz.

File metadata

File hashes

Hashes for respan_exporter_anthropic_agents-1.0.2.tar.gz
Algorithm Hash digest
SHA256 17706377df144a3686deb1b0cd707fb945fa20ed1e5f7625f9d2e8df518daec7
MD5 b6ff50e1397df03e9e2c402b64ff912e
BLAKE2b-256 e89f77d280ab46831e83a9310973f1b0e5efeea517787e96a27ded64efea37ef

See more details on using hashes here.

File details

Details for the file respan_exporter_anthropic_agents-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for respan_exporter_anthropic_agents-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ef76a425f35be88a83a88600feaa85681bd49d0191b8b56095cfc09ecbc5b2e
MD5 8221a69710bf7a951dc17b48a8def5cd
BLAKE2b-256 94e7b1a6f306d7ed3815a4a84109a27837d9a14f05674a90a69ecb2c44766b4e

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