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-openaior 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 spanmap and usestrace.set_span_in_context(step_span)to anchor each post-hoc TOOL span on the matching STEP. STEPSpanContexts remain valid parents even afterend(). - H2 (provider-name fallback):
opentelemetry-instrumentation-openai-v2 == 0.62b1only emits the legacygen_ai.systemattribute on its LLM span; the newgen_ai.provider.nameattribute is missing. As a pure fallback the wildtool plugin writes bothgen_ai.system="openai"andgen_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 emitsgen_ai.provider.namenatively this fallback can be removed. - M1: CHAIN span now carries
input.value(last user message ininference_data["messages"], truncated to 4096 chars) andoutput.value(JSON ofaction_name_label/task_idx/is_optimal). - M2: STEP span now carries
gen_ai.react.finish_reasonon error paths. Mapping table is inexecute.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, bypassingOTEL_INSTRUMENTATION_GENAI_CAPTURE_*gating inopentelemetry-util-genai. The customwildtool.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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.