Skip to main content

LoongSuite BFCL v4 Instrumentation

LoongSuite Python instrumentation for the Berkeley Function Call Leaderboard v4 (bfcl-eval, package bfcl_eval).

Span Topology

ENTRY  enter_ai_application_system          gen_ai.span.kind=ENTRY,  op=enter
└─ AGENT  invoke_agent {test_entry_id}      gen_ai.span.kind=AGENT,  op=invoke_agent
   ├─ STEP  react step                      gen_ai.span.kind=STEP,   op=react
   │   ├─ LLM   chat {model}                (created by downstream vendor SDK probe)
   │   └─ TOOL  execute_tool {fn}           gen_ai.span.kind=TOOL,   op=execute_tool
   └─ STEP  react step
       └─ ...

This instrumentation deliberately does not create LLM spans. They are emitted by the downstream vendor SDK probe (OpenAI / Anthropic / Google / DashScope / LiteLLM / etc.) so that token usage and request payloads stay in sync with the SDK that actually performed the request.

Installation

pip install loongsuite-instrumentation-bfclv4

Usage

opentelemetry-instrument bfcl generate \
    --model gpt-4o-2024-11-20-FC \
    --test-category simple_python \
    --num-threads 2

Or programmatically:

from opentelemetry.instrumentation.bfclv4 import BFCLv4Instrumentor

BFCLv4Instrumentor().instrument()
# ... run BFCL ...
BFCLv4Instrumentor().uninstrument()

Compatibility With Downstream LLM SDK Probes

Scenario Recommended downstream probe
OpenAI / OpenAI Responses / OSS via vLLM / SGLang / DeepSeek (OpenAI-compatible) opentelemetry-instrumentation-openai
Anthropic / Claude loongsuite-instrumentation-claude-agent-sdk
Gemini / Google loongsuite-instrumentation-google-adk
Qwen / DashScope loongsuite-instrumentation-dashscope
LiteLLM loongsuite-instrumentation-litellm

OSS Provider Notes

For OSS handlers (vLLM / SGLang served via the OpenAI-compatible API), the BFCL probe sets gen_ai.provider.name to vllm / sglang / oss and adds bfcl.oss.backend for disambiguation. Downstream OpenAI probes will still report gen_ai.provider.name=openai on the LLM span; this is expected.

Custom Attributes

Attribute Where Description
gen_ai.framework = bfclv4 ENTRY/AGENT/STEP/TOOL Framework tag
bfcl.test_category ENTRY/AGENT Test category
bfcl.num_threads ENTRY Configured thread pool size
bfcl.test_case_count ENTRY Number of test cases
bfcl.run_ids ENTRY Whether the run targeted specific IDs
bfcl.test_entry_id AGENT Test entry id
bfcl.turn_idx STEP Multi-turn turn index (0-based)
bfcl.query_mode STEP FC or prompting
bfcl.oss.backend AGENT/STEP vllm / sglang / unknown (only OSS)
bfcl.tool.duration_is_estimated TOOL True (latency is averaged across batch)

Metadata

Release files for loongsuite-instrumentation-bfclv4 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-bfclv4 0.9.0
File Interpreter ABI Platform Actions
loongsuite_instrumentation_bfclv4-0.9.0-py3-none-any.whl Python 3 none any Details for loongsuite_instrumentation_bfclv4-0.9.0-py3-none-any.whl

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

Download URL loongsuite_instrumentation_bfclv4-0.9.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7cddd23b57c9fbf720cd951ae8d33a3832d74e2764ef4877d53a421a2fc11c38
BLAKE2b-256 checksum
How to use checksums
97c2c0b82febf4c6b77dee43ee1b447a63a3a7c48bb18405a4922b66986f0d4c
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-bfclv4 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