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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
U
Unit 42
IT之家
IT之家
Y
Y Combinator Blog
T
Tailwind CSS Blog
B
Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
I
InfoQ
J
Java Code Geeks
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog

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