Files
klz-cables.com/.pnpm-store/v10/files/f8/1a0135898270174189a30d9e26a3bf704bea8d180753e5bc920bd9d614ba72ad96e1b5b12ea29c962b74c8cf7bd63877788f6498f948258b84be6dd4701af9
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

37 lines
1.5 KiB
Plaintext

import type { CompiledGraph, LangGraphOptions } from './types';
/**
* Instruments StateGraph's compile method to create spans for agent creation and invocation
*
* Wraps the compile() method to:
* - Create a `gen_ai.create_agent` span when compile() is called
* - Automatically wrap the invoke() method on the returned compiled graph with a `gen_ai.invoke_agent` span
*
*/
export declare function instrumentStateGraphCompile(originalCompile: (...args: unknown[]) => CompiledGraph, options: LangGraphOptions): (...args: unknown[]) => CompiledGraph;
/**
* Directly instruments a StateGraph instance to add tracing spans
*
* This function can be used to manually instrument LangGraph StateGraph instances
* in environments where automatic instrumentation is not available or desired.
*
* @param stateGraph - The StateGraph instance to instrument
* @param options - Optional configuration for recording inputs/outputs
*
* @example
* ```typescript
* import { instrumentLangGraph } from '@sentry/cloudflare';
* import { StateGraph } from '@langchain/langgraph';
*
* const graph = new StateGraph(MessagesAnnotation)
* .addNode('agent', mockLlm)
* .addEdge(START, 'agent')
* .addEdge('agent', END);
*
* instrumentLangGraph(graph, { recordInputs: true, recordOutputs: true });
* const compiled = graph.compile({ name: 'my_agent' });
* ```
*/
export declare function instrumentLangGraph<T extends {
compile: (...args: any[]) => any;
}>(stateGraph: T, options?: LangGraphOptions): T;
//# sourceMappingURL=index.d.ts.map