LangSmith に OpenTelemetry サポートが導入されました
LangSmith が OpenTelemetry のサポートを開始し、開発者が標準的なトレーシングエクスポート器を通じて LLM アプリケーションの観測データを一元管理できるようになった。
キーポイント
OpenTelemetry 形式の直接取り込み対応
LangSmith の API レイヤーが OpenTelemetry 形式のトレースを直接受け付け、任意のエクスポート器から LangSmith のエンドポイントへデータを転送可能になった。
OpenLLMetry セマンティック規約のサポート
生成 AI 向けの OpenLLMetry 形式(セマンティック規約)に対応し、LLM モデルやベクトルデータベースなどの標準的なインストゥルメンテーションデータを即座に解析できる。
LLM 監視とシステム観測の統合
従来の LLM 監視機能と、アプリケーション全体のシステムテレメトリを単一のプラットフォームで統合し、エンドツーエンドのパフォーマンス可視化を実現する。
影響分析・編集コメントを表示
影響分析
この発表は、LLM アプリケーション開発における観測可能性(Observability)の標準化を加速させる重要な一歩です。開発者が個別の LLM 監視ツールと汎用システム監視ツールの間を行き来する必要がなくなり、開発フローの効率化とトラブルシューティングの精度向上が期待されます。特に OpenTelemetry という業界標準への対応は、LangSmith のエコシステム内での地位を強化し、より広範な開発者層への普及を後押しします。
編集コメント
LLM アプリケーションの運用において、監視ツールの断絶は大きな課題でしたが、OpenTelemetry 標準への完全対応により、この課題を解消する実用的なソリューションが提供されました。

LangSmith は、分散トレーシングと観測のためのオープン標準である OpenTelemetry 形式のトレースを取り込む機能をサポートするようになりました。OpenTelemetry を利用することで、開発者は広範なプログラミング言語、フレームワーク、および監視ツールにわたってテレメトリデータを計測・エクスポートでき、幅広い相互運用性を実現できます。
今回のアップデートにより、LangSmith の API レイヤーは OpenTelemetry トレースを直接受け付けるようになりました。サポートされている OpenTelemetry エクスポート先のいずれかを LangSmith の OTEL エンドポイントに指定するだけで、トレースが取り込まれ、LangSmith 内で完全にアクセス可能になります。これにより、統一された LLM モニタリング とシステムテレメトリを通じて、アプリケーションのパフォーマンスを包括的に把握することが可能になります。
OpenTelemetry セマンティック・コンベンション
OpenTelemetry は、さまざまなユースケースにおける属性名やデータに対して セマンティック・コンベンション を定義しています。例えば、データベース、メッセージングシステム、HTTP や gRPC などのプロトコルに関するセマンティック・コンベンションが存在します。LangSmith の場合、特に生成 AI 向けのセマンティック・コンベンションが重要です。この分野は比較的新しいため、既存のコンベンションはいくつか存在しますが、新しい公式標準はまだ開発中です。
現在、OpenLLMetry 形式のトレースをサポートしています。これは、さまざまな LLM モデル、ベクトルデータベース、一般的な LLM フレームワークに対して、すぐに使えるインストゥルメンテーション(計装)を可能にするセマンティック・コンベンションおよび実装です。データは OpenLLMetry セマンティック・コンベンションに従って送信する必要があります。その後、OpenTelemetry 互換の SDK を設定して LangSmith の OTEL エンドポイントに接続することで、トレースを LangSmith に取り込むことができます。
今後、OpenTelemetry Gen AI セマンティック・コンベンション など、他のセマンティック・コンベンションによるトレースの受け入れも、それらの進化に合わせてサポートする予定です。
以下では、いくつかの異なる開始方法について順を追って説明します。
OpenTelemetry ベースのクライアントでの始め方
この例では、市販の OpenTelemetry Python クライアントの使用をカバーしています。なお、このアプローチは、お好みの言語で利用可能な他の OpenTelemetry 互換 SDK でも機能します。
まず、Python の依存関係をインストールしてください:
pip install openai
pip install opentelemetry-sdk
pip install opentelemetry-exporter-otlp
次に、OpenTelemetry 用の環境変数を設定してください:
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.smith.langchain.com/otel
OTEL_EXPORTER_OTLP_HEADERS="x-api-key=<your langsmith api key>,LANGSMITH_PROJECT=<project name>"
その後、openai を呼び出し、必要な属性とともにスパンでラップする以下のコードを実行してください:
from openai import OpenAI
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchSpanProcessor,
)
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
client = OpenAI()
otlp_exporter = OTLPSpanExporter()
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(otlp_exporter)
)
tracer = trace.get_tracer(__name__)
def call_openai():
model = "gpt-4o-mini"
with tracer.start_as_current_span("call_open_ai") as span:
span.set_attribute("langsmith.span.kind", "LLM")
span.set_attribute("langsmith.metadata.user_id", "user_123")
span.set_attribute("gen_ai.system", "OpenAI")
span.set_attribute("gen_ai.request.model", model)
span.set_attribute("llm.request.type", "chat")
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Write a haiku about recursion in programming."
}
]
for i, message in enumerate(messages):
span.set_attribute(f"gen_ai.prompt.{i}.content", str(message["content"]))
span.set_attribute(f"gen_ai.prompt.{i}.role", str(message["role"]))
completion = client.chat.completions.create(
model=model,
messages=messages
)
span.set_attribute("gen_ai.response.model", completion.model)
span.set_attribute("gen_ai.completion.0.content", str(completion.choices[0].message.content))
span.set_attribute("gen_ai.completion.0.role", "assistant")
span.set_attribute("gen_ai.usage.prompt_tokens", completion.usage.prompt_tokens)
span.set_attribute("gen_ai.usage.completion_tokens", completion.usage.completion_tokens)
span.set_attribute("gen_ai.usage.total_tokens", completion.usage.total_tokens)
return completion.choices[0].message
if __name__ == "__main__":
call_openai()
LangSmith ダッシュボードには、こちらのようなトレースが表示されるはずです。
詳細については、ドキュメントをご覧ください。
Traceloop SDK の使い方始め方
この例では、Traceloop の OpenLLMetry SDK を使用してトレースを送信する方法を解説します。この SDK は、モデル、ベクトルデータベース、フレームワークの幅広い統合を、追加設定なしでサポートしています。
始めるには、以下の手順に従ってください。まず、OpenLLMetry Traceloop SDK をインストールしてください:
pip install traceloop-sdk
環境変数を設定します:
TRACELOOP_BASE_URL=https://api.smith.langchain.com/otel
TRACELOOP_HEADERS=x-api-key=<your_api_key>
その後、SDK を初期化します:
from traceloop.sdk import Traceloop
Traceloop.init()
以下は、OpenAI のチャット完了機能を使用した完全な例です:
import os
from openai import OpenAI
from traceloop.sdk import Traceloop
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
Traceloop.init()
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Write a haiku about recursion in programming."
}
]
)
print(completion.choices[0].message)
LangSmith ダッシュボードには、こちら のようなトレースが表示されるはずです。
詳細については、ドキュメント をご覧ください。
Vercel AI SDK での始め方
LangSmith ライブラリによって定義されたクライアントサイドのトレースエクスポート器を使用して、Vercel AI SDK の統合をサポートしています。この統合を使用するには:まず、AI SDK パッケージをインストールしてください。
npm install ai @ai-sdk/openai zod
次に、環境を設定します。
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_API_KEY=<your-api-key>
以下の例では OpenAI API を使用していますが、一般的には必須ではありません
export OPENAI_API_KEY=<your-openai-api-key>
まず、プロジェクトのルートディレクトリに *instrumentation.js* ファイルを作成してください。Next.js アプリ内で OpenTelemetry のインストルメンテーションを設定する方法については、こちら で詳しく解説しています。
import { registerOTel } from "@vercel/otel";
import { AISDKExporter } from "langsmith/vercel";
export function register() {
registerOTel({
serviceName: "langsmith-vercel-ai-sdk-example",
traceExporter: new AISDKExporter(),
});
}
その後、トレースしたい AI SDK の呼び出しに experimental_telemetry 引数を追加してください。利便性を高めるために、LangSmith 用の追加メタデータを付加する AISDKExporter.getSettings() メソッドを用意しています。
import { AISDKExporter } from "langsmith/vercel";
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
await streamText({
model: openai("gpt-4o-mini"),
prompt: "Write a vegetarian lasagna recipe for 4 people.",
experimental_telemetry: AISDKExporter.getSettings(),
});
LangSmith ダッシュボードに このようなトレース が表示されるはずです。
詳細については、Vercel AI SDK 統合 の LangSmith ドキュメントをご覧ください。
関連コンテンツ

企業アナウンス
インターラプト プレビュー:MC 紹介

Becca Weng
2026 年 4 月 28 日
7
分
image.png)
エージェントアーキテクチャ
LangSmith
オープンソース
LangSmith と LangChain OSS が EU AI Act の要件を満たすのを支援する方法


J. タルボット、
B. ウェンク
2026 年 4 月 27 日
7
分

企業アナウンスメント
2026 年 4 月:LangChain ニュースレター
LangChain チーム
2026 年 4 月 27 日
4
分
エージェントが実際に何をしているかを確認する
エージェントエンジニアリングプラットフォームである LangSmith は、開発者がすべてのエージェントの意思決定をデバッグし、評価の変更を行い、ワンクリックでデプロイできるように支援します。
原文を表示

LangSmith now supports ingesting traces in OpenTelemetry format, an open standard for distributed tracing and observability. OpenTelemetry allows developers to instrument and export telemetry data across a wide range of programming languages, frameworks, and monitoring tools for broad interoperability.
With this update, LangSmith’s API layer can now accept OpenTelemetry traces directly. You can point any supported OpenTelemetry exporter to the LangSmith OTEL endpoint, and your traces will be ingested and fully accessible within LangSmith — giving a complete view of your application’s performance with unified LLM monitoring and system telemetry.
OpenTelemetry semantic conventions
OpenTelemetry defines semantic conventions for attribute names and data across various use cases. For example, there are semantic conventions for databases, messaging systems, and protocols such as HTTP or gRPC. For LangSmith, we specifically care about semantic conventions for generative AI. As this area is new, there are a few existing conventions, but new official standards are still being developed.
We now support traces in the OpenLLMetry format, a semantic convention and implementation that enables out-of-the-box instrumentation for a range of LLM models, vector databases, and common LLM frameworks. Data must be sent with the OpenLLMetry semantic convention; you can then configure an OpenTelemetry-compatible SDK to point to LangSmith’s OTEL endpoint to ingest traces into LangSmith.
We plan to support accepting traces via other semantic conventions such as the OpenTelemetry Gen AI semantic convention as they evolve.
Below, we’ll walk through a few different ways to get started.
Getting started with an OpenTelemetry based client
This example covers using the off the shelf OpenTelemetry Python client. Note that this approach would work with any OpenTelemetry compatible SDK in the language of your choice.
First, install Python dependencies:
pip install openai
pip install opentelemetry-sdk
pip install opentelemetry-exporter-otlpNext, configure your environment variables for OpenTelemetry:
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.smith.langchain.com/otel
OTEL_EXPORTER_OTLP_HEADERS="x-api-key=<your langsmith api key>,LANGSMITH_PROJECT=<project name>"Then run the following code which calls openai and wraps that with a span along with the required attributes:
from openai import OpenAI
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
BatchSpanProcessor,
)
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
client = OpenAI()
otlp_exporter = OTLPSpanExporter()
trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(
BatchSpanProcessor(otlp_exporter)
)
tracer = trace.get_tracer(__name__)
def call_openai():
model = "gpt-4o-mini"
with tracer.start_as_current_span("call_open_ai") as span:
span.set_attribute("langsmith.span.kind", "LLM")
span.set_attribute("langsmith.metadata.user_id", "user_123")
span.set_attribute("gen_ai.system", "OpenAI")
span.set_attribute("gen_ai.request.model", model)
span.set_attribute("llm.request.type", "chat")
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Write a haiku about recursion in programming."
}
]
for i, message in enumerate(messages):
span.set_attribute(f"gen_ai.prompt.{i}.content", str(message["content"]))
span.set_attribute(f"gen_ai.prompt.{i}.role", str(message["role"]))
completion = client.chat.completions.create(
model=model,
messages=messages
)
span.set_attribute("gen_ai.response.model", completion.model)
span.set_attribute("gen_ai.completion.0.content", str(completion.choices[0].message.content))
span.set_attribute("gen_ai.completion.0.role", "assistant")
span.set_attribute("gen_ai.usage.prompt_tokens", completion.usage.prompt_tokens)
span.set_attribute("gen_ai.usage.completion_tokens", completion.usage.completion_tokens)
span.set_attribute("gen_ai.usage.total_tokens", completion.usage.total_tokens)
return completion.choices[0].message
if __name__ == "__main__":
call_openai()You should see a trace in your LangSmith dashboard like this one.
For more information, see the documentation.
Getting started with Traceloop SDK
This example covers sending tracing using the OpenLLMetry SDK from Traceloop, which supports a wide range of integrations of models, vector databases, and frameworks out of the box.
To get started, follow these steps. First, install the OpenLLMetry Traceloop SDK:
pip install traceloop-sdk
Set up your environment variables:
TRACELOOP_BASE_URL=https://api.smith.langchain.com/otel
TRACELOOP_HEADERS=x-api-key=<your_api_key>Then initialize the SDK:
from traceloop.sdk import Traceloop
Traceloop.init()Here is a complete example using an OpenAI chat completion:
import os
from openai import OpenAI
from traceloop.sdk import Traceloop
client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
Traceloop.init()
completion = client.chat.completions.create(
model="gpt-4o-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Write a haiku about recursion in programming."
}
]
)
print(completion.choices[0].message)You should see a trace in your LangSmith dashboard like this one.
For more information, see the documentation.
Getting started with Vercel AI SDK
We support the Vercel AI SDK integration using a client side trace exporter that is defined by the LangSmith library. To use this integration: first, install the AI SDK package:
npm install ai @ai-sdk/openai zod
Next, configure your environment:
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_API_KEY=<your-api-key>
# The below examples use the OpenAI API, though it's not necessary in general
export OPENAI_API_KEY=<your-openai-api-key>First, create an *instrumentation.js* file in your project root. Learn more about how to setup OpenTelemetry instrumentation within your Next.js app here.
import { registerOTel } from "@vercel/otel";
import { AISDKExporter } from "langsmith/vercel";
export function register() {
registerOTel({
serviceName: "langsmith-vercel-ai-sdk-example",
traceExporter: new AISDKExporter(),
});
}Afterwards, add the experimental_telemetry argument to your AI SDK calls that you want to trace. For convenience, we've included the AISDKExporter.getSettings() method which appends additional metadata for LangSmith.
import { AISDKExporter } from "langsmith/vercel";
import { streamText } from "ai";
import { openai } from "@ai-sdk/openai";
await streamText({
model: openai("gpt-4o-mini"),
prompt: "Write a vegetarian lasagna recipe for 4 people.",
experimental_telemetry: AISDKExporter.getSettings(),
});You should see a trace in your LangSmith dashboard like this one.
For more information, see the LangSmith documentation for the Vercel AI SDK integration.
Related content

Company Announcements
Interrupt Preview: Meet the MC

Becca Weng
April 28, 2026
7
min
.png)
Agent Architecture
LangSmith
Open Source
How LangSmith and LangChain OSS Help You Meet EU AI Act Requirements


J. Talbot,
B. Weng
April 27, 2026
7
min

Company Announcements
April 2026: LangChain Newsletter
The LangChain Team
April 27, 2026
4
min
See what your agent is really doing
LangSmith, our agent engineering platform, helps developers debug every agent decision, eval changes, and deploy in one click.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み