Flowise integration
Flowise is a visual LangChain builder. Spanlens captures Flowise flows two ways: by routing LLM calls through the Spanlens proxy, which works for any node that calls OpenAI / Anthropic / Gemini, or by attaching the Spanlens LangChain callback handler in a custom node for full span-tree capture.
Option A: Proxy mode (zero code)
In Flowise, open the LLM credential settings for any chat model node and change the base URL to the Spanlens proxy endpoint for that provider.
| Provider | Base URL |
|---|---|
| OpenAI / Azure OpenAI | https://api.spanlens.io/proxy/openai/v1 |
| Anthropic | https://api.spanlens.io/proxy/anthropic/v1 |
| Google Gemini | https://api.spanlens.io/proxy/gemini/v1beta |
Use your Spanlens API key (sl_live_*) in place of the provider API key. Spanlens stores your provider key securely and signs the upstream call on your behalf. Every LLM node in the flow now lands in /requests automatically.
Option B: Custom callback node (full span tree)
For full per-node span capture (including the visual flow topology), register a custom Flowise tool that attaches the Spanlens LangChain handler to the chain config.
// flowise-spanlens-tool.ts
import { SpanlensClient } from '@spanlens/sdk'
import { createSpanlensCallbackHandler } from '@spanlens/sdk/langchain'
const client = new SpanlensClient()
const handler = createSpanlensCallbackHandler({ client })
export const onExecuteFlow = async (flowConfig, runtimeContext) => {
return {
...runtimeContext,
callbacks: [...(runtimeContext.callbacks || []), handler],
}
}tsWhat you see in Spanlens
Each Flowise flow execution becomes a trace. The flow ID is preserved as a tag. Each LLM node becomes a span with model + cost + latency. Tool nodes become tool spans. Conditional branches and parallel fan-outs are reconstructed from the parent_span_id chain.
Where to go next
- LangChain integration, since Flowise builds on LangChain.
- Proxy reference, full proxy URL list.