feat: LangSmith OTel 观测方案对接 AgentKit APMPlus#228
Open
bigerous wants to merge 1 commit into
Open
Conversation
- Add langchain_otel_agent.py: LangGraph multi-step agent with LangSmith OTel auto-tracing, exporting traces to AgentKit APMPlus via OTLP gRPC - Add langchain_otel_guide.md: integration guide for the observability approach - Update requirements.txt: add OTel and LangSmith dependencies Key features: - Zero-invasive tracing via OtelSpanProcessor on existing TracerProvider - APMPlus integration with gRPC header auth (x-byteapm-appkey) - Resource attribute: apmplus.business_carrier=agentkit_runtime - FastAPI auto-instrumentation for HTTP-level spans - Multi-path workflow demo (classify → simple_qa / research+tools / escalation) Co-Authored-By: Claude <noreply@anthropic.com>
bigerous
force-pushed
the
feat/langchain-otel-observability
branch
from
June 24, 2026 08:32
c805c18 to
214a598
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
增加一个使用 LangChain 的 LangSmith OTel 观测方案,对接到 AgentKit 平台 APMPlus 观测后端的示例。
改动内容
langchain_otel_agent.py:LangGraph 多步骤 Agent + LangSmith OTel 自动追踪,通过 OTLP gRPC 导出 trace 到 APMPluslangchain_otel_guide.md:观测方案接入指南requirements.txt:合并 OTel 相关依赖核心方案
特性
OtelSpanProcessor挂到已有 TracerProvider,自动为所有 LangGraph 节点、LLM 调用、工具调用生成 spanx-byteapm-appkeyheader 鉴权(gRPC 要求全小写)apmplus.business_carrier=agentkit_runtime运行方式
观测示例:
