Skip to main content

LoongSuite Microsoft AutoGen instrumentation

Project description

LoongSuite Microsoft AutoGen Instrumentation

This package instruments Microsoft AutoGen 0.7.x AgentChat flows.

It follows the AutoGen 0.7 native telemetry boundary:

  • AutoGen core already emits native GenAI-style spans for invoke_agent, create_agent, and execute_tool.
  • This instrumentation registers a span processor that converts those native spans to LoongSuite GenAI attributes by setting gen_ai.span.kind, replacing gen_ai.system=autogen with gen_ai.provider.name=autogen, and normalizing span kinds.
  • AgentChat AssistantAgent.on_messages_stream is wrapped with ExtendedTelemetryHandler.invoke_agent() when no native AutoGen agent span is already active.
  • AgentChat AssistantAgent._call_llm is wrapped with ExtendedTelemetryHandler.llm() so model calls produce LoongSuite LLM spans for any AutoGen ChatCompletionClient.

Usage

from opentelemetry.instrumentation.autogen import AutoGenInstrumentor

AutoGenInstrumentor().instrument()

Environment switches:

  • ARMS_AUTOGEN_INSTRUMENTATION_ENABLED=false disables the instrumentation.
  • ARMS_AUTOGEN_AGENT_SPAN_ENABLED=false disables the AgentChat agent wrapper.
  • ARMS_AUTOGEN_LLM_SPAN_ENABLED=false disables the AgentChat LLM wrapper.
  • ARMS_AUTOGEN_NATIVE_SPAN_PROCESSOR_ENABLED=false disables native span normalization.

The package uses opentelemetry-util-genai and respects the shared GenAI content-capture environment variables.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

File details

Details for the file loongsuite_instrumentation_autogen-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for loongsuite_instrumentation_autogen-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7325e12583552c3900fc46985ab7ba6cdb43abc80959bae956c41e258ae1b34e
MD5 de3379d093d5a3f778ecd05c0698775a
BLAKE2b-256 0187b0793761fd4da81aa722b4d38a9ac64dccf231bd3c2b037e372f7c2597d4

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