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
250
Gemini CLIでもセキュアで堅牢な開発をしたい!
yunosukey
1
660
DevOps/MLOpsに学ぶエージェントの可観測性
yunosukey
1
1.2k
Agent Development Kitで作るマルチエージェントアプリケーション(AIAgent勉強会)
yunosukey
4
1.9k
Agent Development Kitで作るマルチエージェントアプリケーション(GCNT2025)
yunosukey
0
92
AIエージェントのオブザーバビリティについて
yunosukey
1
940
クラウド開発環境Cloud Workstationsの紹介
yunosukey
0
470
フロントエンドオブザーバビリティ on Google Cloud
yunosukey
1
390
ChatGPTのアルゴリズム
yunosukey
0
460
Other Decks in Programming
See All in Programming
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
Webプラットフォームで議論されているセキュリティ課題 / Security issues being discussed on Web Platforms
petamoriken
0
420
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
1.5k
PHPプロジェクトの結合バランスを可視化する #php_night
kajitack
0
230
Swift愛好会と私(ウホーイ) / Swift Fan Club and Uhooi
uhooi
0
150
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
460
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
2
260
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.6k
『寄り添うラジオ』をAIで作る 体験価値から逆算した、会話しないUXと品質設計
theoriatec2024
3
140
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
410
Building an army of robots
kneath
306
46k
Git: the NoSQL Database
bkeepers
PRO
432
67k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
BBQ
matthewcrist
89
10k
Raft: Consensus for Rubyists
vanstee
141
7.7k
Utilizing Notion as your number one productivity tool
mfonobong
4
580
Test your architecture with Archunit
thirion
2
2.4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
450
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
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