Skip to main content

LoongSuite WildToolBench Instrumentation

OpenTelemetry instrumentation for the WildToolBench benchmark framework.

Installation

WildToolBench is not available on PyPI. Install it from source:

pip install -e /path/to/WildToolBench/wild-tool-bench
pip install loongsuite-instrumentation-wildtool

Requirements

  • OpenAI provider instrumentation: To produce LLM spans, you must also enable an OpenAI provider instrumentation (e.g., opentelemetry-instrumentation-openai or LoongSuite's equivalent). This plugin creates ENTRY/AGENT/CHAIN/STEP/TOOL spans but does not create LLM spans itself.

Usage

from opentelemetry.instrumentation.wildtool import WildToolInstrumentor

WildToolInstrumentor().instrument()

# Run WildToolBench as usual — spans are automatically generated.

Span Topology

ENTRY (enter_ai_application_system)
└── AGENT (invoke_agent wildtool)
    └── CHAIN (workflow task_{idx})
        └── STEP (react step)
            ├── [LLM span — provider instrumentation]
            └── TOOL (execute_tool {tool_name})

Patch Points

# Target Span Type
P1 multi_threaded_inference ENTRY
P2 BaseHandler.inference_multi_turn AGENT
P3 BaseHandler.inference_and_eval_multi_step CHAIN + TOOL
P4 BaseHandler._request_tool_call STEP
P5 BaseHandler._parse_api_response (token extraction)

Round 2 fixes (see llm-dev/execute.md § "修订记录 (Round 2 fix)")

  • H1: TOOL span is now parented on STEP, not CHAIN. Strategy A enhanced — the chain wrapper holds a round → STEP span map and uses trace.set_span_in_context(step_span) to anchor each post-hoc TOOL span on the matching STEP. STEP SpanContexts remain valid parents even after end().
  • H2 (provider-name fallback): opentelemetry-instrumentation-openai-v2 == 0.62b1 only emits the legacy gen_ai.system attribute on its LLM span; the new gen_ai.provider.name attribute is missing. As a pure fallback the wildtool plugin writes both gen_ai.system="openai" and gen_ai.provider.name="openai" on the STEP span (not on the LLM span — that is owned by the OpenAI v2 instrumentation and we do not patch it). Once the OpenAI v2 instrumentation upstream emits gen_ai.provider.name natively this fallback can be removed.
  • M1: CHAIN span now carries input.value (last user message in inference_data["messages"], truncated to 4096 chars) and output.value (JSON of action_name_label/task_idx/is_optimal).
  • M2: STEP span now carries gen_ai.react.finish_reason on error paths. Mapping table is in execute.md § "M2: gen_ai.react.finish_reason 取值映射".
  • M3: TOOL span explicitly writes gen_ai.tool.call.arguments / gen_ai.tool.call.result / gen_ai.tool.description, bypassing OTEL_INSTRUMENTATION_GENAI_CAPTURE_* gating in opentelemetry-util-genai. The custom wildtool.tool.execution_mode = "ground_truth_replay" is preserved.

Metadata

Release files for loongsuite-instrumentation-wildtool 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for loongsuite-instrumentation-wildtool 0.9.0
File Interpreter ABI Platform Actions
loongsuite_instrumentation_wildtool-0.9.0-py3-none-any.whl Python 3 none any Details for loongsuite_instrumentation_wildtool-0.9.0-py3-none-any.whl

Release files / loongsuite_instrumentation_wildtool-0.9.0-py3-none-any.whl

Download URL loongsuite_instrumentation_wildtool-0.9.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8514995256c2cbc8cc5da8cd9e99a61d1e9bb38f749ce949d61757300a9b6d4e
BLAKE2b-256 checksum
How to use checksums
a53aef87d75f8fc8f93d56e5e5f02dc6d06b0f79d142defff5ba5fceb3ab3852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for loongsuite-instrumentation-wildtool 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page