LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangSmith
  • Client
  • Run Trees
  • Traceable
  • Evaluation
  • Schemas
  • Langchain
  • Jest
  • Vitest
  • Wrappers
  • Anonymizer
  • Jestlike
  • Vercel
  • Anthropic
  • Sandbox
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangSmith
ClientRun TreesTraceableEvaluationSchemasLangchainJestVitestWrappersAnonymizerJestlikeVercelAnthropicSandbox
Language
Theme
JavaScriptlangsmith_openapi_clientresourcesThreadslistTraces
Method●Since v0.10

listTraces

Alpha: The request and response contract may change; Retrieve all traces belonging to a specific thread within a project.

Copy
listTraces(
  threadID: string,
  query: ThreadListTracesParams,
  options: RequestOptions
): PagePromise<ThreadTraceListItemsItemsCursorGetPagination, ThreadTraceListItem>

Parameters

NameTypeDescription
threadID*string
query*ThreadListTracesParams
optionsRequestOptions

Example

View source on GitHub
Copy
// Automatically fetches more pages as needed.
for await (const threadTraceListItem of client.threads.listTraces(
  'thread_id',
  { project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
)) {
  // ...
}