@lelemondev/sdk - v0.10.1
    Preparing search index...

    Function captureSpan

    • Manually capture a span (tool call, retrieval, custom) Use this when auto-detection doesn't cover your use case

      Parameters

      Returns void

      // Capture a tool call
      captureSpan({
      type: 'tool',
      name: 'get_weather',
      input: { location: 'San Francisco' },
      output: { temperature: 72, conditions: 'sunny' },
      durationMs: 150,
      });
      // Capture a retrieval/RAG operation
      captureSpan({
      type: 'retrieval',
      name: 'vector_search',
      input: { query: 'user question', k: 5 },
      output: { documents: [...] },
      durationMs: 50,
      });