Skip to main content

Respan instrumentation for AgentOps

This package sends spans created by AgentOps' Python decorators through the active Respan OpenTelemetry pipeline.

It adapts AgentOps' own span kinds and content:

  • trace / session and workflow decorators become Respan workflow spans
  • agent decorators become agent spans
  • task and operation decorators become task spans
  • tool and guardrail decorators retain their matching Respan log types
  • AgentOps LLM spans keep their GenAI messages and usage, with AgentOps' request-type and function fields promoted to the canonical Respan contract

The adapter does not initialize the AgentOps exporter. Activate Respan before calling AgentOps-decorated code:

from agentops import task, trace
from respan import Respan
from respan_instrumentation_agentops import AgentOpsInstrumentor

respan = Respan(
    api_key="...",
    instrumentations=[AgentOpsInstrumentor()],
)

@task
def prepare(value: str) -> str:
    return value.upper()

@trace
def workflow(value: str) -> str:
    return prepare(value)

workflow("hello")
respan.shutdown()

Set capture_content=False on AgentOpsInstrumentor to omit decorator inputs and outputs while retaining operation identity and status.

Download files

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

Source Distribution

respan_instrumentation_agentops-0.1.0.tar.gz (5.4 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_instrumentation_agentops-0.1.0.tar.gz.

File metadata

File hashes

Hashes for respan_instrumentation_agentops-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b7a3d3ae0c5fccebd1ede31a3b3fbc11816c397ebc2048366264da9d5c83c4fd
MD5 36c11c95c99bd18d66d3d48c3a1b7049
BLAKE2b-256 391b36bc753313582cee368658d9e12290afc9702cb0577697742903838cb704

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for respan_instrumentation_agentops-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 658b5f5dde7d8ea5d4138c12d312aa07d78e1780c1d500f16a05d470ddfca72f
MD5 f7b256bc91244e38537c9113c557e0cf
BLAKE2b-256 1f459484fac7231687e6296785007e63260eb5400141d18f605236d2d5c1cd03

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 Sentry Error logging StatusPage Status page