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
470
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
Transcript
17 slides
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 が主流になりそう - 現実的には代表値で十分かも? - ヒストグラムのユースーケースをぜひ教えてください!
More Decks by rmatsuoka
See All by rmatsuoka
OpenTelemetry でゼロコード計装と手動計装どっちもやる
rmatsuoka
0
270
OpenTelemetry の Trace を中心としたパフォーマンス改善
rmatsuoka
1
2.7k
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530
Become a Pro
speakerdeck
PRO
31
6.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
330
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
990
New Earth Scene 8
popppiees
5
2.8k
Code Reviewing Like a Champion
maltzj
529
40k
Unsuck your backbone
ammeep
672
58k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
How to Talk to Developers About Accessibility
jct
2
620
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
3k