-
Notifications
You must be signed in to change notification settings - Fork 237
docs(otel): document remappings #2989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| description: Langfuse automatically renders tool definitions and tool calls from your agent traces, making it easy to debug function calling. | ||
| sidebarTitle: Tool Calls | ||
| --- | ||
|
Check failure on line 4 in content/docs/observability/features/tool-calls.mdx
|
||
|
Comment on lines
+1
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Missing required Extended reasoning...What the bug isThe new Code path 1: MDX collection build fails on frontmatter validation
const baseFrontmatterSchema = frontmatterSchema.extend({ ... });
Code path 2: Metadata generation crashesEven if validation were lenient, const seoTitle = pageData.seoTitle || page.data.title;
const ogTitle = pageData.seoTitle ? seoTitle : enrichOgTitle(seoTitle, slug, sectionTitle);With no const lower = title.toLowerCase().trim();That throws Step-by-step proof (what happens if you build right now)
How to fixOne-line change in the frontmatter: ---
title: Tool Calls
description: Langfuse automatically renders tool definitions and tool calls from your agent traces, making it easy to debug function calling.
sidebarTitle: Tool Calls
---Or |
||
|
|
||
| import { GhDiscussionsPreview } from "@/components/gh-discussions/GhDiscussionsPreview"; | ||
|
|
||
| # Tool Call Visualization | ||
|
|
||
| Tool calls are the heartbeat of agents. Langfuse automatically renders all tools available to an LLM at the top of each generation, allowing you to instantly see if the LLM selected the right one. | ||
|
|
||
| <Frame fullWidth> | ||
|  | ||
| </Frame> | ||
|
|
||
| ## What's Displayed | ||
|
|
||
| **Tool Definitions**: All tools available to the LLM during that interaction: | ||
|
|
||
| - Tool name and call status | ||
| - Call count badge ("called", "called 2x", "not called") | ||
| - Expandable description and parameter schema | ||
| - Toggle between formatted and JSON views | ||
|
|
||
| **Tool Calls in Chat**: Called tools appear with their arguments and call IDs. Numbering matches the available tools list for easy validation. | ||
|
|
||
| **Automatic Sorting**: Called tools appear first, followed by unused tools. | ||
|
|
||
| ## Supported Frameworks | ||
|
|
||
| Tool visualization works automatically with: | ||
|
|
||
| - OpenAI (Chat Completions & Responses API) | ||
| - Google Gemini / Vertex AI | ||
| - Vercel AI SDK | ||
| - LangGraph / LangChain | ||
| - Pydantic AI | ||
| - Microsoft Agent Framework | ||
|
|
||
| No changes to your instrumentation code required. If you're using tools with a supported framework, visualization appears automatically. | ||
|
|
||
| ## How Tools Are Detected | ||
|
|
||
| Langfuse detects **available tools** from supported framework and OpenTelemetry metadata, normalizes them into the generation input, and renders them at the top of each generation. Langfuse detects **called tools** from the model output and renders them inline in the chat view with their arguments and call IDs. | ||
|
|
||
| For the exact OpenTelemetry and framework metadata shapes that are remapped into `input.tools`, `tool_definitions`, `tool_calls`, and `tool_call_names`, see [Tool definitions and tool calls](/integrations/native/opentelemetry#tool-definitions-and-tool-calls) in the OpenTelemetry mapping docs. | ||
|
|
||
| ## Why This Matters | ||
|
|
||
| 1. **Faster debugging**: Instantly see if the right tools were available and called | ||
| 2. **Better prompt engineering**: Understand which tool descriptions lead to actual usage | ||
| 3. **Cost optimization**: Identify unused tools to reduce token usage | ||
|
|
||
| ## Related | ||
|
|
||
| - [Agent Graphs](/docs/observability/features/agent-graphs) | ||
| - [Observation Types](/docs/observability/features/observation-types) | ||
|
|
||
| ## GitHub Discussions | ||
|
|
||
| <GhDiscussionsPreview labels={["feat-tool-calls"]} /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| --- | ||
| description: Langfuse automatically renders tool definitions and tool calls from your agent traces, making it easy to debug function calling. | ||
| sidebarTitle: Tool Calls | ||
| --- | ||
|
|
||
| # Tool Call Visualization | ||
|
|
||
| Tool calls are the heartbeat of agents. Langfuse automatically renders all tools available to an LLM at the top of each generation, allowing you to instantly see if the LLM selected the right one. | ||
|
|
||
| <Frame fullWidth> | ||
|
Check failure on line 10 in pages/docs/observability/features/tool-calls.mdx
|
||
|
Comment on lines
+1
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 This PR adds a stray duplicate Extended reasoning...What the bug isThis PR adds two copies of the same documentation page:
The Why it is deadThe repo migrated from Nextra to Fumadocs and now routes
So the Concrete proof of the drift hazardThe two files differ already, in the same PR that introduced them:
This is exactly the maintenance hazard the deletion avoids: future copy edits will land on only one of the two files, and the dead copy will silently bit-rot. Step-by-step proof of impact
FixDelete |
||
|  | ||
| </Frame> | ||
|
|
||
| ## What's Displayed | ||
|
|
||
| **Tool Definitions**: All tools available to the LLM during that interaction: | ||
|
|
||
| - Tool name and call status | ||
| - Call count badge ("called", "called 2x", "not called") | ||
| - Expandable description and parameter schema | ||
| - Toggle between formatted and JSON views | ||
|
|
||
| **Tool Calls in Chat**: Called tools appear with their arguments and call IDs. Numbering matches the available tools list for easy validation. | ||
|
|
||
| **Automatic Sorting**: Called tools appear first, followed by unused tools. | ||
|
|
||
| ## Supported Frameworks | ||
|
|
||
| Tool visualization works automatically with: | ||
|
|
||
| - OpenAI (Chat Completions & Responses API) | ||
| - Google Gemini / Vertex AI | ||
| - Vercel AI SDK | ||
| - LangGraph / LangChain | ||
| - Pydantic AI | ||
| - Microsoft Agent Framework | ||
|
|
||
| No changes to your instrumentation code required—if you're using tools with a supported framework, visualization appears automatically. | ||
|
|
||
| ## How Tools Are Detected | ||
|
|
||
| Langfuse detects **available tools** from supported framework and OpenTelemetry metadata, normalizes them into the generation input, and renders them at the top of each generation. Langfuse detects **called tools** from the model output and renders them inline in the chat view with their arguments and call IDs. | ||
|
|
||
| For the exact OpenTelemetry and framework metadata shapes that are remapped into `input.tools`, `tool_definitions`, `tool_calls`, and `tool_call_names`, see [Tool definitions and tool calls](/integrations/native/opentelemetry#tool-definitions-and-tool-calls) in the OpenTelemetry mapping docs. | ||
|
|
||
| ## Why This Matters | ||
|
|
||
| 1. **Faster debugging**: Instantly see if the right tools were available and called | ||
| 2. **Better prompt engineering**: Understand which tool descriptions lead to actual usage | ||
| 3. **Cost optimization**: Identify unused tools to reduce token usage | ||
|
|
||
| ## Related | ||
|
|
||
| - [Agent Graphs](/docs/observability/features/agent-graphs) | ||
| - [Observation Types](/docs/observability/features/observation-types) | ||
|
|
||
| ## GitHub Discussions | ||
|
|
||
| import { GhDiscussionsPreview } from "@/components/gh-discussions/GhDiscussionsPreview"; | ||
|
|
||
| <GhDiscussionsPreview labels={["feat-tool-calls"]} /> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new docs file omits the required
titlefrontmatter key, which causes the docs loader to fail during build ([MDX] invalid frontmatter ... title: expected string, received undefinedwhen runningpnpm next build). Because this page is part of thecontent/docscollection, the missing field breaks site compilation rather than just degrading this one page.Useful? React with 👍 / 👎.