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 でゼロコード計装と手動計装どっちもやる
Search
rmatsuoka
May 23, 2025
Programming
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OpenTelemetry でゼロコード計装と手動計装どっちもやる
rmatsuoka
May 23, 2025
Transcript
12 slides
OpenTelemetry で ゼロコード計装と手動計装 どっちもやる rmatsuoka はてな オブザーバビリティ / 関ジャバ'25 5月度
LT
Mackerel 作ってます! • Mackerel は Scala • OpenTelemetry の トレース,
メトリッ クを中心とした APM をリリースしていま す!よろしくお願い します!
OpenTelemetry のゼロコード計装 • アプリケーションコードいじらない!楽! • 起動オプションに JavaAgent を追加するだ け! ◦
-javaagent:/path/to/opentelemetry-javaagent.jar
None
None
ゼロコード計装 • JavaAgent を追加するだけで JVM, HTTP, DB など各種メトリックやアプリケーションの トレースが取得できる!
でも、これじゃ足りない? • たとえば機能追加するとき… ◦ この数字ってどのくらいなんだろう?もし大きかった らパフォーマンスに影響がありそうだな… • 不安な部分をあらかじめ計装することで自信 をもって実装したい!
そんな時は手動計装 • 自分でカウントするコードを足す! • でも手動計装ってめんどくさいんでしょ? ◦ テレメトリーの送信先を設定したり ◦ 色々めんどくさそう…
手動計装とゼロコード計装の組み合わ せは簡単! 手動計装でもテレメトリーの送信などは JavaAgent がやってくれるので、数を数えると ころだけコードを足せば OK!
https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/f324d6641eff09cb058bca106be 692f7f3660546/docs/misc/interop-design/interop-design.md#interoperability-design
手動計装のために追加するコード例 private val meter = GlobalOpenTelemetry .get().getMeter(getClass.getName()) private val counter
= meter .counterBuilder("name").setUnit("ms").build() counter.add(1)
まとめ • とりあえずゼロコード計装でテレメトリーを 受信! • 他にもあれを知りたい!ってなったら手動計 装を追加!
More Decks by rmatsuoka
See All by rmatsuoka
Exponential Histogram?
rmatsuoka
0
470
OpenTelemetry の Trace を中心としたパフォーマンス改善
rmatsuoka
1
2.7k
Other Decks in Programming
See All in Programming
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
RaspberryPi 5で軽くはじめるk3sとtailscaleを用いたホームサーバー構築 (1)
nasum
0
390
GraphQL の onError と Nullability のこれから
quramy
0
220
AI Augmentation Techniques with Liberty
ivargrimstad
1
510
LLM 101: Exploring LLMs, Starting with Tokens.
dalinaum
0
110
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
220
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
370
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
3
570
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
140
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
170
AI時代のTerminal環境を UNIX哲学で設計・運用する
yasunori0418
1
360
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
180
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Designing Experiences People Love
moore
143
24k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
880
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.4k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
670
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
Optimizing for Happiness
mojombo
378
72k