SlideShare a Scribd company logo
分散トレーシングによる
ソフトウェアの信頼性構築
鈴⽊ 章太郎
Elastic テクニカルプロダクトマーケティングマネージャー/エバンジェリスト
デジタル庁 省庁業務グループ ソリューションアーキテクト
Elastic
Technical Product Marketing
Manager/Evangelist
デジタル庁
省庁業務グループ
ソリューションアーキテクト
元 Microsoft Technical Evangelist
Twitter : @shosuz
Shotaro Suzuki
アジェンダ
• 分散トレーシングってどんなもの︖
• トレーシングの観点から⾒た Metrics
• 最新技術の展望と課題
• Observability Journey の簡素化
• Enterprise Search と Observability による
カスタマーエクスペリエンス向上
@shosuz
本⽇ご紹介するソースコードは
最後のリソースのスライドに纏めて
掲載してあります︕
ぜひダウンロードして試してみて
ください。
@riferrei
@riferrei
分散トレーシングって
どんなもの︖
開発者にありがちな信頼性の捉え⽅
開発者にありがちな信頼性の捉え⽅
デプロイした後は、コードをテストしない
システムのテストをしている
同時接続
Network
不具合
ディストロ、
カーネル、OSの
バージョン
キャッシュのヒット
とハズレ
スケジューラと
そのクセ
クライアントの
バックオフ、
リトライ
メモリガベージ
コレクション
デプロイメント
コードの不具合
コードレース
条件
クロックシンクの
問題
「機械に限界まで負荷をかけ、それを維持しようとするならば、
その限界はどこなのか、ある程度⾒極めなければならない。
外を⾒てごらん。あそこには完璧なラップがある。ミスは許され
ない。すべてのギアチェンジ、すべてのコーナー。完璧に。 」-
ケン・マイルズ
お客様から︓
「503 エラーが発⽣しま
した。」
Ops の問題︓503 エラーを⾒つける
疑う 掘り下げる 解決する
• メトリクスの値を⾒る
• アラートで追いつかれる
• トポロジーを理解する
• 異常の切り分け
• コンテキストデータの収集
• ログやイベントの読み込み
• コードパッチの作成
• 新しいリリースの作成
10% 60% 30%
分散型トレースによるレスキュー
Black-Box White-Box
• コードは変更されない
• ランタイムによる処理
• 最⼩限の実⾏可視化
• コードは変更される
• アプリケーションによる処理
• 完全な実⾏可視化
インスツルメンテーション︓ブラックボックスとホワイトボックスの⽐較
Building Software Reliability through Distributed Tracing.pdf
トレーシングの観点
から⾒た Metrics
Building Software Reliability through Distributed Tracing.pdf
4つのゴールデンシグナル
レイテンシー トラフィック
エラー 飽和状態
これまでで最⾼のモニタリングアドバイス :
"ユーザーが満⾜
しなければ、99.999
も意味がない"
4つのゴールデンシグナル、1つのパースペクティブ
レイテンシー トラフィック
エラー 飽和状態
ビジネス
トランザクション
4つのゴールデンシグナル、1つのパースペクティブ
最新技術の展望と
課題
物事がシンプルだったことを覚えていますか︖
ハードコードされたログ記録⽂
type Log struct {
request_path string
request_size int64
status int32
latency_ms float64
}
logEntry := Log{
"/customers/find",
840, 200, 35
}
fmt.Printf("%+v", logEntry)
ログ⽂はそれぞれ
"スキーマ "を持つ
スレッドトラブルシューティングのフォロー
API Customer Database
Thread
1
API Customer Database
Thread
2
Log{"/api/find",
840, 200, 35} Log{"/customer/find",
235, 200, 30}
Log{"/db/find",
450, 200, 5}
Log{"/api/find",
840, 200, 45} Log{"/customer/find",
235, 200, 42}
Log{"/db/find",
450, 200, 3}
カオスの始まり︓分散コンピューティング
Thread 1
Host 1
Thread 2
Thread 1
Host 2
Thread 2
仮想化技術の活⽤
Host 1
VM 1 VM 2
API Customer Database
Thread
1
API Customer Database
Thread
2
API Customer Database
Thread
1
API Customer Database
Thread
2
コンテナ化の活⽤
Host 1
VM 1 VM 2
Container 1 Container 2
API Customer Database
Thread
1
API Customer Database
Thread
2
API Customer Database
Thread
1
API Customer Database
Thread
2
私は、あなたにとって
冗談のような存在
ですか︖
Ops の⼈々:
“それではサービスを機能に
分解してみよう"
トレースによりシステム全体のステッチングを⾃動化
Service A Service B Service C Service D
ビジネストランザクション
トランザクションデータを収集し、検索可能な状態にする
トレース、スパン、コンテキストの伝播
Service A (Child Span)
Service B (Child Span)
Service C (Child Span)
Service D (Child Span)
Transaction (Root Span)
Trace ID:
12345
Trace ID:
12345
Trace ID:
12345
Trace ID:
12345
Trace ID:
12345
⬅ This is the context!
Time:
55ms
Time:
30ms
Time:
15ms
Time:
5ms
Time:
5ms
しかし、サービスが同期でない場合はどうでしょうか︖
REST
API
Analytics
Building Software Reliability through Distributed Tracing.pdf
Observability
Journey を
簡素化する
Three pillars of observability
Logs
Metrics Traces
⼈、
プロセス、
ツール
⼈、
プロセス、
ツール
⼈、
プロセス、
ツール
統⼀された Observability : さらに良い
Logs
Traces
Metrics
すべてのデータを、ひとつのコンテクストで
統合されたビジネスと オペレーション KPI
可能な限りオープンスタンダードを使⽤する
https://openTelemetry.io
The Elasticsearch
Platform
Enterprise Search Observability Security
Kibana
Explore, Visualize, Engage
Elasticsearch
Store, Search, Analyze
Integrations
Connect, Collect, Alert
Public cloud Hybrid On-premises
In a world where endless data creates endless possibility, search helps people and organizations
thrive.
• あらゆる種類のテレメトリーデータに対応する
シングルエージェント
• 全エージェントを対象とした集中管理および
ポリシー設定
• OpenTelemetry のサポート
• 豊富な可視化機能とデータ探索機能により、
すぐに使える分析、その場限りの分析が可能
Elastic の特⻑
Enterprise Search と
Observability による
カスタマーエクスペリエンス向上
The Gallivant Web Shop
Architecture of The Gallivant Web Shop
Internet
Ship
metrics
& logs
End
user
Elastic Stack
Actions
Backend
micro services
Monitoring
Cart
Catalog
Ordering
Checkout
Search
React Client DevOps
Engineer
SecOps
Engineer
Marketer
…
End
user
Public Cloud
マイクロサービスアーキテクチャの採⽤はメリットも多いが、
同時に問題発⽣時の根本的な原因を⾒つけるのが難しくなる
Observability で解決できる主なビジネス課題
開発者、DevOps、
SRE の⽣産性
⾼い信頼性
コストパフォーマンスの
最適化
デジタルトランスフォーメーションの達成には新たなアプローチが不可⽋
クラウドネイティブアプリと
モノリシックなアプリの
⼀元管理
迅速な復旧
リリースや運⽤に関する
コストの最⼩化
Building Software Reliability through Distributed Tracing.pdf
サービスとしての
Observability︖
マネージドクラウドサービス
です。
Elastic Cloud はあなたのためにある
https://cloud.elastic.co/registration
リソース
• ブログ記事 「分散トレーシングによるソフトウェア信頼性の構築」
• ビジネスと運⽤の課題解決に、オブザーバビリティがカギとなる理由
• DevOps のためのオブザーバビリティ ― 不可⽋なビジネスイニシアチブ
• Elastic APM on GitHub(GitHub の Elastic APM ページ)
• Elastic Observability documentation on GitHub(GitHub の Elastic オブザーバビリティ
ドキュメントページ)
• OpenTelemetry in Java with Elastic Observability on GitHub(GitHub の Open
Telemetry in Java with Elastic Observability ページ)
• Elastic Cloud を無料で試⽤する
.NETラボ 勉強会 2022年4⽉
2022/4/23 13:30-18:00
https://dotnetlab.connpass.com/event/243974/
Elastic セキュリティワークショップ
2022/4/27 14:00-17:00
https://www.elastic.co/jp/virtual-events/elastic-security-workshop
Jaguʻeʼr Cloud Native #5
クラウドネイティブ設計コンペバトル
2022/4/28 13:00-15:00
https://jaguer-cloud-native.connpass.com/event/244567/
Jaguʼeʼr 会員企業所属のみです。ごめんなさい︕
Thank you for your
attention!

More Related Content

PDF
Realizling Dapr Observability Using Elastic Stack
PDF
deep dive distributed tracing
PDF
Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...
PDF
Utilizing elasticcloudforallusecases
PDF
Elastic Cloudを活用!!ゼロトラストセキュリティの「はじめの一歩」
PDF
ServerlessConf Tokyo2018 サーバーレスなシステムのがんばらない運用監視
PDF
Elastichelps fintechenablesdx usingaibasedautomationand anomalydetection
PDF
Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...
Realizling Dapr Observability Using Elastic Stack
deep dive distributed tracing
Introducing Elastic 8.1 Release - More Integration, Faster Indexing Speed, Lo...
Utilizing elasticcloudforallusecases
Elastic Cloudを活用!!ゼロトラストセキュリティの「はじめの一歩」
ServerlessConf Tokyo2018 サーバーレスなシステムのがんばらない運用監視
Elastichelps fintechenablesdx usingaibasedautomationand anomalydetection
Developers-Summit-2022_Improving-Digital-Customer-Experience-with-Enterprise_...

Similar to Building Software Reliability through Distributed Tracing.pdf (20)

PDF
Centralized Observability for the Azure Ecosystem
PDF
Elastic7.12 release-new-features-on-0428
PDF
Elastic 7.13-new-features-20210624
PDF
Migrating tocloudnativeapplicationwithusingelasticapm
PDF
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
PDF
エンタープライズにおけるブロックチェーン活用 実用フェーズへの課題と期待
PDF
モノタロウの1900万商品を検索する Elasticsearch構築運用事例(2022-10-26 第50回Elasticsearch 勉強会発表資料)
PDF
Elastic stack_&_cloud_7.11_updates-summary
PDF
Big query and elasticsearch insight at scale
PDF
Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...
PDF
実践Observability
PDF
What's New in the Elastic 8.2 Release - Seamless User Experience with Search -
PDF
7.9 elasticstackandcloudtechnicalenablement excitingnewfeatures-jpn0827
PDF
AWS Lake Formation で実現、マイクロサービスのサーバーレスな分散トレーシング
PDF
20130927 adstir emr
PDF
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
PDF
Apm enables python app observability
PDF
New Relicで始める、.NET Applications on AWSのObservability
PDF
Elastic Stackの紹介とOpenStackでの活用事例(Searchlightなど) - OpenStack最新情報セミナー 2016年5月
PPTX
【完全版】SaaS新規事業に最も必要なエコシステムの作り方 by クラウドサイン ~リリース2年で導入社数2万社を突破したエコシステムの秘訣 ~
Centralized Observability for the Azure Ecosystem
Elastic7.12 release-new-features-on-0428
Elastic 7.13-new-features-20210624
Migrating tocloudnativeapplicationwithusingelasticapm
ログ+メトリック+トレースの組み合わせで構築する一元的なオブザーバビリティ
エンタープライズにおけるブロックチェーン活用 実用フェーズへの課題と期待
モノタロウの1900万商品を検索する Elasticsearch構築運用事例(2022-10-26 第50回Elasticsearch 勉強会発表資料)
Elastic stack_&_cloud_7.11_updates-summary
Big query and elasticsearch insight at scale
Elastic x Microsoft Azure Integration Evolution - Integrated Monitoring for S...
実践Observability
What's New in the Elastic 8.2 Release - Seamless User Experience with Search -
7.9 elasticstackandcloudtechnicalenablement excitingnewfeatures-jpn0827
AWS Lake Formation で実現、マイクロサービスのサーバーレスな分散トレーシング
20130927 adstir emr
[Modern Cloud Day Tokyo 2019] 実践エンタープライズ・ブロックチェーン ~ システム設計・運用における課題とそのソリューション
Apm enables python app observability
New Relicで始める、.NET Applications on AWSのObservability
Elastic Stackの紹介とOpenStackでの活用事例(Searchlightなど) - OpenStack最新情報セミナー 2016年5月
【完全版】SaaS新規事業に最も必要なエコシステムの作り方 by クラウドサイン ~リリース2年で導入社数2万社を突破したエコシステムの秘訣 ~
Ad

More from Shotaro Suzuki (20)

PDF
This is how our first offline technical event in three years was able to succ...
PDF
Introducing the new features of the Elastic 8.6 release.pdf
PDF
NET MAUI for .NET 7 for iOS, Android app development
PDF
What's New in the Elastic 8.5 Release
PDF
What's New in the Elastic 8.4 Release
PDF
Power Apps x .NET ~ Transforming Business Applications with Fusion Development
PDF
devreljapan2022evaadvoc-final.pdf
PDF
elastic-mabl-co-webinar-20220729
PDF
Application development with c#, .net 6, blazor web assembly, asp.net web api...
PDF
Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...
PDF
Building a search experience with Elastic – Introducing Elastic's latest samp...
PDF
Developing .NET 6 Blazor WebAssemby apps with Radzen Blazor component library...
PDF
Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...
PDF
Application development with c#, .net 6, blazor web assembly, asp.net web api...
PDF
Building a Flutter Development Environment with VSCode and Useful Extensions
PDF
Application development with c#, .net 6, blazor web assembly, asp.net web api...
PDF
Application development with c#, .net 6, blazor web assembly, asp.net web api...
PDF
Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...
PDF
Firebase, Firestore Extension for Elastic App Search Integration-20220216
PDF
Let's build a simple app with .net 6 asp.net core web api, react, and elasti...
This is how our first offline technical event in three years was able to succ...
Introducing the new features of the Elastic 8.6 release.pdf
NET MAUI for .NET 7 for iOS, Android app development
What's New in the Elastic 8.5 Release
What's New in the Elastic 8.4 Release
Power Apps x .NET ~ Transforming Business Applications with Fusion Development
devreljapan2022evaadvoc-final.pdf
elastic-mabl-co-webinar-20220729
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Discover what's new in the Elastic 8.3 release - Find, monitor, and protect e...
Building a search experience with Elastic – Introducing Elastic's latest samp...
Developing .NET 6 Blazor WebAssemby apps with Radzen Blazor component library...
Building 3D mobile apps using Power Apps Mixed Reality controls, Azure SQL Da...
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Building a Flutter Development Environment with VSCode and Useful Extensions
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Application development with c#, .net 6, blazor web assembly, asp.net web api...
Introducing the elastic 8.0 release a new era of speed, scale, relevance, and...
Firebase, Firestore Extension for Elastic App Search Integration-20220216
Let's build a simple app with .net 6 asp.net core web api, react, and elasti...
Ad

Building Software Reliability through Distributed Tracing.pdf