Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
OpenTelemetry + LLM = OpenLLMetry!?
Search
Yunosuke Yamada
May 14, 2025
Programming
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OpenTelemetry + LLM = OpenLLMetry!?
Yunosuke Yamada
May 14, 2025
More Decks by Yunosuke Yamada
See All by Yunosuke Yamada
AI時代に成長するエンジニアに必要なスキルとは.pdf
yunosukey
0
260
Gemini CLIでもセキュアで堅牢な開発をしたい!
yunosukey
1
670
DevOps/MLOpsに学ぶエージェントの可観測性
yunosukey
1
1.2k
Agent Development Kitで作るマルチエージェントアプリケーション(AIAgent勉強会)
yunosukey
4
1.9k
Agent Development Kitで作るマルチエージェントアプリケーション(GCNT2025)
yunosukey
0
94
AIエージェントのオブザーバビリティについて
yunosukey
1
950
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
480
フロントエンドオブザーバビリティ on Google Cloud
yunosukey
1
390
ChatGPTのアルゴリズム
yunosukey
0
460
Other Decks in Programming
See All in Programming
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
430
Webの地図
yosuke_furukawa
PRO
6
4.6k
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
120
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
700
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
290
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
470
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
420
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
290
JRuby: Past, Present, and Future
headius
0
140
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
360
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
77
5.5k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
430
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
700
Navigating Weather and Climate Data
rabernat
0
520
Amusing Abliteration
ianozsvald
1
310
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
550
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
Marketing to machines
jonoalderson
1
5.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
Being A Developer After 40
akosma
91
590k
Transcript
OpenTelemetry + LLM = OpenLLMetry!? Jagu'e'r オブザービリティ分科会 Meetup#2 株式会社スリーシェイク 山田悠之介
Copyright © 3-shake, Inc. All Rights Reserved.
宣伝 弊社有志による技術勉強会 『3-shake SRE Tech Talk #12 オンサイト』が あさって(5/16)開催されます! 今回のテーマはオブザーバビリティとなっております。
オンライン、オフラインともに余裕があるので お時間ある方はぜひ! 2
生成AIアプリとオブザーバビリティ ここ1、2年でRAGやAIエージェントなど生成AIを利用したアプリケーションが増加 生成AIアプリの難しさに対してオブザーバビリティを考える必要性 3 何が生成 される? どれくらい 時間がかかる? どれくらい お金がかかる?
巨大な ワークフロー 外部サービス の呼び出し モデルの更新
OpenLLMetry、OpenLIT いくつか解決策の方針があります 解決策 4 監視SaaSの機能を利用する OpenTelemetryを利用する 専用のツールを利用する DatadogのLLM Observability、 New
RelicのAI monitoring、 SentryのLLM Monitoringなど LangSmith、Langfuse
OpenLLMetryとは LLM向けにOpenTelemetryを拡張したOSS 特徴 • 監視ツールに依存しない計装 • 独自のテレメトリも収集可能 • Python、Node.js、Go、Rubyに対応 こんな場合にオススメ
• 既存の監視でOpenTelemetryを使っている • LLM Monitoring機能のあるSaaS、ツールを使っていない 万人向けではない • 監視ツールは「作るのではなく買う」『入門 監視』 5 https://docs.kloudmate.com/openllmetry-opentelemetry-based-observability-for-llms
どのような値が取れるか • OpenTelemetry側にSemantic conventions for generative AI systems というのがあり、概ねそれに準拠している ◦
というかOpenLLMetryのセマンティック規約が OpenTelemetryに取り込まれたらしい • 一部を抜粋すると ◦ ベンダー、モデル ◦ 生成の設定(max_tokens、temperature、top_p) ◦ リクエストとレスポンス、トークン数 6
インテグレーション 主な計装対象(一部抜粋) • Anthropic • Amazon Bedrock • OpenAI、Azure OpenAI
• LangChain • Gemini AI、Vertex AI 主な送信先(一部抜粋) • OpenTelemetry Collector、Grafana • Datadog、Dynatrace、New Relic、Sentry、Splunk • Google Cloud、Azure 7
やってみる Pythonでの自動計装 8 from opentelemetry.exporter.cloud_logging import CloudLoggingExporter from opentelemetry.exporter.cloud_trace import
CloudTraceSpanExporter from opentelemetry.exporter.cloud_monitoring import CloudMonitoringMetricsExporter from traceloop.sdk import Traceloop Traceloop.init( app_name="your-app-name", exporter=CloudTraceSpanExporter(), metrics_exporter=CloudMonitoringMetricsExporter(), logging_exporter=CloudLoggingExporter(), )
やってみる Vertex AI SDKを使った呼び出し 9 import vertexai from vertexai.generative_models import
GenerativeModel vertexai.init( project=PROJECT_ID, location=LOCATION, ) model = GenerativeModel("gemini-2.5-flash-preview-04-17") response = model.generate_content("OpenTelemetryって何?")
やってみる Traceエクスプローラで確認 10
自動計装の実装を見てみる(1) 自動計装対象のメソッドの一覧 11 WRAPPED_METHODS = [ { "package": "vertexai.generative_models", "object":
"GenerativeModel", "method": "generate_content", "span_name": "vertexai.generate_content", "is_async": False, }, ... https://github.com/traceloop/openllmetry/blob/7a1b8bbea7fcffb2f7cbd127fada7b6c7b046280/packages/ opentelemetry-instrumentation-vertexai/opentelemetry/instrumentation/vertexai/__init__.py#L29-L36
自動計装の実装を見てみる(2) wraptによるラッピング 12 for wrapped_method in WRAPPED_METHODS: wrap_package = wrapped_method.get("package")
wrap_object = wrapped_method.get("object") wrap_method = wrapped_method.get("method") wrap_function_wrapper( wrap_package, f"{wrap_object}.{wrap_method}", ( _awrap(tracer, wrapped_method) if wrapped_method.get("is_async") else _wrap(tracer, wrapped_method) ), ) https://github.com/traceloop/openllmetry/blob/7a1b8bbea7fcffb2f7cbd127fada7b6c7b046280/packages /opentelemetry-instrumentation-vertexai/opentelemetry/instrumentation/vertexai/__init__.py#L360-L3
自動計装の実装を見てみる(3) ラッパーの処理 13 span = tracer.start_span( name, kind=SpanKind.CLIENT, attributes={ SpanAttributes.LLM_SYSTEM:
"VertexAI", SpanAttributes.LLM_REQUEST_TYPE: LLMRequestTypeValues.COMPLETION.value, }, ) _handle_request(span, args, kwargs, llm_model) response = wrapped(*args, **kwargs) if response: if is_streaming_response(response): return _build_from_streaming_response(span, response, llm_model) elif is_async_streaming_response(response): return _abuild_from_streaming_response(span, response, llm_model) else: _handle_response(span, response, llm_model) span.end() return response https://github.com/traceloop/openllmetry/blob/7a1b8bbea7fcffb2f7cbd127fada7b6c7b046280/pack ages/opentelemetry-instrumentation-vertexai/opentelemetry/instrumentation/vertexai/__init__.py# L322-L344 入力の情報をスパン属性に追加 出力の情報をスパン属性に追加、など
注意点 • Google Gen AI SDKは未対応 ◦ Gen AI SDK:Gemini
APIとVertex AIを統一的に扱えるライブラリ ◦ https://github.com/traceloop/openllmetry/issues/2675 • OpenTelemetryのセマンティック規約に完全に準拠しているわけではない ◦ 例えばプロンプトのイベント ▪ https://github.com/traceloop/openllmetry/issues/2456 ◦ とはいえOpenTelemetryの生成AIのセマンティック規約自体がDevelopmentではある 14
まとめ • 生成AIアプリケーションもオブザーバビリティが必要 • 解決策の1つとしてOpenLLMetryによるOTel計装があり、 自動計装することができる • Gen AI SDKの対応やOpenTelemetryのセマンティック規約への準拠など
発展途上な部分もある 15