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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
rmatsuoka
March 05, 2024
460
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
250
OpenTelemetry の Trace を中心としたパフォーマンス改善
rmatsuoka
1
2.7k
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
142
7.8k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
290
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Speed Design
sergeychernyshev
33
2.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
Docker and Python
trallard
47
4.2k
Chasing Engaging Ingredients in Design
codingconduct
0
370
My Coaching Mixtape
mlcsv
0
360
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
エンジニアに許された特別な時間の終わり
watany
109
250k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
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 が主流になりそう - 現実的には代表値で十分かも? - ヒストグラムのユースーケースをぜひ教えてください!