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
Exponential Histogram?
Search
rmatsuoka
March 05, 2024
450
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Exponential Histogram?
OpenTelemetry Meetup 2024-02 - connpass
の LT で発表した資料です。
rmatsuoka
March 05, 2024
More Decks by rmatsuoka
See All by rmatsuoka
OpenTelemetry でゼロコード計装と手動計装どっちもやる
rmatsuoka
0
240
OpenTelemetry の Trace を中心としたパフォーマンス改善
rmatsuoka
1
2.6k
Featured
See All Featured
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
エンジニアに許された特別な時間の終わり
watany
109
250k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
450
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
310
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Transcript
Exponential Histogram? OpenTelemetry Meet Up 2024-02-15 id:rmatsuoka
id:rmatsuoka - 株式会社はてな - 2023年新卒!! - Mackerel - Application Engineer
Mackerel
Mackerel では OpenTelemetry の メトリクスへの対応を 進めています
OpenTelemetry のメトリクス形式 - Sum - Gauge - Histogram - Exponential
Histogram <- これなに?
Histogram!
ヒストグラムは何に使われているのか - HTTPレスポンスタイム - SQL のクエリにかかった時間 - GC が stop
the world した時間 - Span Metric Connector
Histogram のデータ形式 Bucket: []float ExplicitBounds: []float Timestamp: Time Bucket ExplicitBounds
度数分布表 より引用 実際にはもっとフィールドがある。このデータは概念的なもの。
Exponential Histogram?
Exponential Histogram が送ってくる データ形式 - Bucket: []float - Scale: int
- Timestamp: Time
(再掲) Histogram のデータ形式 - Bucket: []float - ExplicitBounds: []float -
Timestamp: Time
階級はどうやって計算される? s=Scale, Bucket の i-番目の Boundsは 上の数式で表される
Exponential Histogram で計装する - デフォルトでは Histogram として計装され る。 - Exponential
Histogram で計装するには設定 が必要 export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION= BASE2_EXPONENTIAL_BUCKET_HISTOGRAM
Exponential Histogram は何が嬉しい - 階級(Scale) を自動に設定してくれる。 - 普通の Histogram では、自分で階級を設定する必要
がある - 試行錯誤がめんどくさい - 設定した階級がしょぼいと、パーセンタイルなどの誤 差が大きい(p99 が最大値を超えたり)
階級の設定の失敗例 https://opentelemetry.io/blog/2022/exponential-histograms/ から拝借
Histogram を保存するには? - Mackerel が対応しているメトリックの形式は Gauge, Sum など のスカラーな時系列 -
ただヒストグラムも使いたい! - Exponential Histogram は既存のデータ型とは異なって実装コス トが大変 - Gauge: {timestamp, float} - Exponential Histogram: {timestamp, float, []float}
Mackerel ではどう考えた? - Exponential Histogram の扱いは検討中 - 現状 p99 や
max などの代表値(スカラー)だけを保存する - Histogram に比べて Exponential Histogram の方がメリットが ある - 将来 Exponential Histogram が主流になりそう - 現実的には代表値で十分かも? - ヒストグラムのユースーケースをぜひ教えてください!