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.3.tar.gz (7.8 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.3.tar.gz.

File metadata

File hashes

Hashes for respan_exporter_anthropic_agents-1.0.3.tar.gz
Algorithm Hash digest
SHA256 b33f1eb39ae20619e5715c8dd1c2b12324d88d23aa9709ecdad59dc601f6b5ed
MD5 ac8020707b19af7c1a876306245f95d6
BLAKE2b-256 80ee57bdbf2528cdaf15277e2ee70e3af5dd69feb6013030a325d5c85a9449c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for respan_exporter_anthropic_agents-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ee886b100d6b1156d963be143c547cbd58838bba91e3d9181248f496dc7f52cb
MD5 89c7244ec9738e5ee4f79a2fd6131b50
BLAKE2b-256 37668886ce747ea64baef317a289a2574f78049a4c991de43848af170a9c7c87

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