惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

腾讯CDC
aimingoo的专栏
aimingoo的专栏
S
SegmentFault 最新的问题
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
宝玉的分享
宝玉的分享
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
WordPress大学
WordPress大学
N
Netflix TechBlog - Medium
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 聂微东
M
MIT News - Artificial intelligence
F
Fortinet All Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
T
Tailwind CSS Blog
Recent Announcements
Recent Announcements
Jina AI
Jina AI
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks

LangChain Forum - Latest topics

Seeking help regarding the connection between Websocket and tool calls Tool invocation error with empty error message when using `InjectedState` + `Command` return in async tool How to use @langchain/react FileSystem middleware Using ChatSnowflake with agents Built llmsessioncontract on AgentMiddleware: runtime enforcement of tool-call protocols — feedback wanted DeltaChannelHistory not found in langgraph-api:3.12 Improving citation accuracy and reducing hallucinations in custom Parent-Child RAG pipeline (Gemma3:4B + FAISS+BM25 + Cross-encoder reranker) Built a live autonomous AI agent network using LangGraph-style economics — looking for feedback How are you validating LangChain agent output before it executes shell commands? Cross-site pattern pool for production agent failures — looking for 5 pilot teams (open spec, CC-BY-4.0) Metadata filter not filtering for alerts Using custom MCP servers with assistants How to use tool calling using ChatLlamaCpp and Gemma 4 E4B with create_agent? CLI - No Longer Sending traces to Langsmith Connecting the Slack integration fails with invalid_team_for_non_distributed_app The Docs says open router can be used with init_chat_model but throws an error Interested to contribute to langgraph postgre checkpointer for multiple adapter support Modal Inference Trouble understanding and editing experiment summary evaluators feedbacks SSL certificate error from httpx with LangGraph server [Feature Request] Wire allowed_msgpack_modules in langgraph.json Serving an agent with the LangGraph CLI dev command Proposal: implement delete_for_runs for SQLite checkpoint savers WikipediaLoader endup in JSONDecodeError Human-in-the-loop approval dashboard for LangGraph agents — open source, free to deploy Ombre — open source security and audit layer for LangChain apps Should interrupt() be split into two primitives — one for human input, one for s2s data fetching? Unable to delete runs from annotation queue First Bedrock call after idle is slow on TTFT (follow-ups in the same trace are fast)
Enable OpenTelemetry traces without sending data to LangS...
@liurui-1 Ru · 2026-04-18 · via LangChain Forum - Latest topics

1

Hello, I want to send traces and metrics (if it has) of my LangChain apps to the back-end OpenTelemetry Collector along with other apps. This time I do not want to install a local LangSmith server. Is it possible?

hi @liurui-1

try to install langsmith[otel], then set:

  LANGSMITH_OTEL_ENABLED=true
  LANGSMITH_OTEL_ONLY=true            # skip LangSmith writer entirely
  OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
  • LANGSMITH_OTEL_ONLY=true makes the SDK’s background thread bypass the LangSmith ingest path - spans go only to OTLP
    (langsmith/_internal/_background_thread.py::get_tracing_mode, lines 574–594).
  • OTEL_EXPORTER_OTLP_ENDPOINT is read before the default LangSmith endpoint is injected (_internal/otel/_otel_client.py::get_otlp_tracer_provider), so your collector
    replaces api.smith.langchain.com/otel. No LANGSMITH_API_KEY required.
  • Caveat worth flagging to the OP: LangSmith’s OTEL bridge emits traces only, not OTLP metrics - token/latency data arrives as span attributes. For real metric instruments,
    use the OTEL metrics SDK separately.

Docs: Trace with OpenTelemetry - Docs by LangChain

2 Likes

3

Hi @pawel-twardziak , Thanks a lot! Your answer works. One thing I see is that environment variable “LANGSMITH_TRACING=true” is still required.
The environment variables I’m using are:

export LANGSMITH_TRACING=true
export LANGSMITH_OTEL_ENABLED=true
export LANGSMITH_OTEL_ONLY=true
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export LS_APM_OTEL_ENABLED=true
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
export OTEL_SERVICE_NAME=mylangchain

1 Like