René's URL Explorer Experiment


Title: Custom instrumentation - Docs by LangChain

Open Graph Title: Custom instrumentation - Docs by LangChain

X Title: Custom instrumentation - Docs by LangChain

Description: Instrument your code directly to control which functions are traced and how they appear in LangSmith.

Open Graph Description: Instrument your code directly to control which functions are traced and how they appear in LangSmith.

X Description: Instrument your code directly to control which functions are traced and how they appear in LangSmith.

Opengraph URL: https://docs.langchain.com/langsmith/annotate-code

Generator: Mintlify

direct link

Domain: docs.langchain.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://docs.langchain.com/#organization","name":"Docs by LangChain","url":"https://docs.langchain.com","logo":{"@type":"ImageObject","url":"https://mintcdn.com/langchain-5e9cc07a/nQm-sjd_MByLhgeW/images/brand/langchain-docs-dark-blue.png?fit=max&auto=format&n=nQm-sjd_MByLhgeW&q=85&s=5babf1a1962208fd7eed942fa2432ecb"}},{"@type":"WebSite","@id":"https://docs.langchain.com#website","name":"Docs by LangChain","url":"https://docs.langchain.com","publisher":{"@id":"https://docs.langchain.com/#organization"}},{"@type":"WebPage","@id":"https://docs.langchain.com/langsmith/annotate-code#webpage","url":"https://docs.langchain.com/langsmith/annotate-code","name":"Custom instrumentation","description":"Instrument your code directly to control which functions are traced and how they appear in LangSmith.","dateModified":"2026-10-30T19:33:26.446Z","isPartOf":{"@id":"https://docs.langchain.com#website"},"breadcrumb":{"@id":"https://docs.langchain.com/langsmith/annotate-code#breadcrumb"}},{"@type":"BreadcrumbList","@id":"https://docs.langchain.com/langsmith/annotate-code#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tracing setup","item":"https://docs.langchain.com/langsmith/integrations"},{"@type":"ListItem","position":2,"name":"Custom instrumentation","item":"https://docs.langchain.com/langsmith/annotate-code"}]},{"@type":["Article","TechArticle"],"@id":"https://docs.langchain.com/langsmith/annotate-code#article","headline":"Custom instrumentation","name":"Custom instrumentation","description":"Instrument your code directly to control which functions are traced and how they appear in LangSmith.","url":"https://docs.langchain.com/langsmith/annotate-code","mainEntityOfPage":{"@id":"https://docs.langchain.com/langsmith/annotate-code#webpage"},"dateModified":"2026-10-30T19:33:26.446Z","publisher":{"@id":"https://docs.langchain.com/#organization"},"isPartOf":{"@id":"https://docs.langchain.com#website"}}]}

application-nameDocs by LangChain
og:site_nameDocs by LangChain
og:typewebsite
og:imagehttps://langchain-5e9cc07a.mintlify.app/_mintlify/api/og/v2?division=Manual+instrumentation&title=Custom+instrumentation&description=Instrument+your+code+directly+to+control+which+functions+are+traced+and+how+they+appear+in+LangSmith.&theme=5f787871cd9e0fc0371614e6&signature=d214098a793eff0bcd8fac5ea4fd9ea4cc2ed143fb1f2e9f1cc898c0d5396073
og:image:width1200
og:image:height630
twitter:cardsummary_large_image
twitter:imagehttps://langchain-5e9cc07a.mintlify.app/_mintlify/api/og/v2?division=Manual+instrumentation&title=Custom+instrumentation&description=Instrument+your+code+directly+to+control+which+functions+are+traced+and+how+they+appear+in+LangSmith.&theme=5f787871cd9e0fc0371614e6&signature=d214098a793eff0bcd8fac5ea4fd9ea4cc2ed143fb1f2e9f1cc898c0d5396073
twitter:image:width1200
twitter:image:height630
msapplication-config/mintlify-assets/_mintlify/favicons/langchain-5e9cc07a/YSQua9Gt91yRswvJ/_generated/favicon/browserconfig.xml
apple-mobile-web-app-titleDocs by LangChain
msapplication-TileColor#161F34
google-site-verification9_2KHeJwmEdwgncBRk1MsKxriZz7Sc21EJdbfCxkTEo

Links:

/llms.txthttps://docs.langchain.com/llms.txt
Skip to main contenthttps://docs.langchain.com/langsmith/annotate-code#content-area
Get early bird pricing nowhttps://interrupt.langchain.com/
Docs by LangChain home pagehttps://docs.langchain.com/
Ask AIhttps://chat.langchain.com/
GitHubhttps://github.com/langchain-ai
Try LangSmithhttps://smith.langchain.com/
Try LangSmithhttps://smith.langchain.com/
Overviewhttps://docs.langchain.com/langsmith/observability
Tracehttps://docs.langchain.com/langsmith/observability-quickstart
Debughttps://docs.langchain.com/langsmith/view-traces
Observehttps://docs.langchain.com/langsmith/dashboards
Referencehttps://docs.langchain.com/langsmith/reference
Quickstarthttps://docs.langchain.com/langsmith/observability-quickstart
Tutorialhttps://docs.langchain.com/langsmith/observability-llm-tutorial
Conceptshttps://docs.langchain.com/langsmith/observability-concepts
Chathttps://docs.langchain.com/langsmith/chat#observability
Customize instrumentationhttps://docs.langchain.com/langsmith/annotate-code
Trace with APIhttps://docs.langchain.com/langsmith/trace-with-api
Log LLM callshttps://docs.langchain.com/langsmith/log-llm-trace
Log retriever traceshttps://docs.langchain.com/langsmith/log-retriever-trace
Metadata parametershttps://docs.langchain.com/langsmith/ls-metadata-parameters
Upload files with traceshttps://docs.langchain.com/langsmith/upload-files-with-traces
Cost trackinghttps://docs.langchain.com/langsmith/cost-tracking
Usage and billinghttps://docs.langchain.com/langsmith/usage-and-billing
Prerequisiteshttps://docs.langchain.com/langsmith/annotate-code#prerequisites
Use @traceable / traceablehttps://docs.langchain.com/langsmith/annotate-code#use-%40traceable-%2F-traceable
Use the trace context manager (Python only)https://docs.langchain.com/langsmith/annotate-code#use-the-trace-context-manager-python-only
Use the RunTree APIhttps://docs.langchain.com/langsmith/annotate-code#use-the-runtree-api
Example usagehttps://docs.langchain.com/langsmith/annotate-code#example-usage
Specify a custom run IDhttps://docs.langchain.com/langsmith/annotate-code#specify-a-custom-run-id
Ensure all traces are submitted before exitinghttps://docs.langchain.com/langsmith/annotate-code#ensure-all-traces-are-submitted-before-exiting
Relatedhttps://docs.langchain.com/langsmith/annotate-code#related
instrumentationhttps://docs.langchain.com/langsmith/observability-concepts#manual-instrumentation
tracehttps://docs.langchain.com/langsmith/observability-concepts#traces
@traceable decoratorhttps://docs.langchain.com/langsmith/annotate-code#use-%40traceable-%2F-traceable
trace context managerhttps://docs.langchain.com/langsmith/annotate-code#use-the-trace-context-manager-python-only
RunTree APIhttps://docs.langchain.com/langsmith/annotate-code#use-the-runtree-api
Specifying a custom run IDhttps://docs.langchain.com/langsmith/annotate-code#specify-a-custom-run-id
Ensuring all traces are submittedhttps://docs.langchain.com/langsmith/annotate-code#ensure-all-traces-are-submitted-before-exiting
LangChain-specific instructionshttps://docs.langchain.com/langsmith/trace-with-langchain
integrations overviewhttps://docs.langchain.com/langsmith/integrations
​https://docs.langchain.com/langsmith/annotate-code#prerequisites
tracing_context(enabled=True/False)https://docs.langchain.com/langsmith/annotate-code#use-the-trace-context-manager-python-only
RunTree objectshttps://docs.langchain.com/langsmith/annotate-code#use-the-runtree-api
LangSmith API keyhttps://docs.langchain.com/langsmith/create-account-api-key
agent-based workspacehttps://docs.langchain.com/langsmith/agent-registry
create an agenthttps://docs.langchain.com/langsmith/create-an-agent
agent addressinghttps://docs.langchain.com/langsmith/log-traces-to-agent
​https://docs.langchain.com/langsmith/annotate-code#use-@traceable-/-traceable
@traceablehttps://reference.langchain.com/python/langsmith/run_helpers/traceable
traceablehttps://reference.langchain.com/javascript/langsmith/traceable
UIhttps://smith.langchain.com?utm_source=docs&utm_medium=cta&utm_campaign=langsmith-signup&utm_content=langsmith-annotate-code
​https://docs.langchain.com/langsmith/annotate-code#use-the-trace-context-manager-python-only
​https://docs.langchain.com/langsmith/annotate-code#use-the-runtree-api
​https://docs.langchain.com/langsmith/annotate-code#example-usage
​https://docs.langchain.com/langsmith/annotate-code#specify-a-custom-run-id
feedbackhttps://docs.langchain.com/langsmith/attach-user-feedback
tracehttps://reference.langchain.com/python/langsmith/run_helpers/trace
​https://docs.langchain.com/langsmith/annotate-code#ensure-all-traces-are-submitted-before-exiting
LangChain tracing guidehttps://docs.langchain.com/langsmith/trace-with-langchain#ensure-all-traces-are-submitted-before-exiting
LangSmith SDKhttps://docs.langchain.com/langsmith/reference
​https://docs.langchain.com/langsmith/annotate-code#related
Observability conceptshttps://docs.langchain.com/langsmith/observability-concepts
Run (span) data formathttps://docs.langchain.com/langsmith/run-data-format
Log user feedback using the SDKhttps://docs.langchain.com/langsmith/attach-user-feedback
Access the current run (span) within a traced functionhttps://docs.langchain.com/langsmith/access-current-span
Configure legacy integrationshttps://docs.langchain.com/langsmith/create-an-agent#use-an-environment-project
Trace with APIhttps://docs.langchain.com/langsmith/trace-with-api
Tracing Basics videohttps://academy.langchain.com/pages/intro-to-langsmith-preview
Connect these docshttps://docs.langchain.com/use-these-docs
Edit this page on GitHubhttps://github.com/langchain-ai/docs/edit/main/src/langsmith/annotate-code.mdx
file an issuehttps://github.com/langchain-ai/docs/issues/new/choose
Trace Claude Cowork sessionsPrevioushttps://docs.langchain.com/langsmith/trace-claude-cowork
Trace with APINexthttps://docs.langchain.com/langsmith/trace-with-api
Docs by LangChain home pagehttps://docs.langchain.com/
githubhttps://github.com/langchain-ai
xhttps://x.com/LangChain
linkedinhttps://www.linkedin.com/company/langchain
youtubehttps://www.youtube.com/@LangChain
Forumhttps://forum.langchain.com/
Changeloghttps://changelog.langchain.com/
LangChain Academyhttps://academy.langchain.com/
Contact Saleshttps://www.langchain.com/contact-sales
Homehttps://langchain.com/
Trust Centerhttps://trust.langchain.com/
Careershttps://langchain.com/careers
Bloghttps://blog.langchain.com/
githubhttps://github.com/langchain-ai
xhttps://x.com/LangChain
linkedinhttps://www.linkedin.com/company/langchain
youtubehttps://www.youtube.com/@LangChain

Viewport: width=device-width, initial-scale=1, viewport-fit=cover


URLs of crawlers that visited me.