Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CloudWatch で APM
Search
Kento Kimura
PRO
January 18, 2024
Technology
0
870
CloudWatch で APM
18th Jan, Jr. Champions 勉強会 #8
Kento Kimura
PRO
January 18, 2024
Tweet
Share
More Decks by Kento Kimura
See All by Kento Kimura
プラットフォームとしての Datadog / Datadog as Platforms
aoto
PRO
1
420
Cloud Run を解剖して コンテナ監視を考える / Breaking Down Cloud Run to Rethink Container Monitoring
aoto
PRO
0
140
Recap of Next - Google Cloud で実践する クラウドネイティブ最前線 / The Frontlines of Cloud-Native with Insights from Google Cloud
aoto
PRO
1
140
AWS で広がるオブザーバビリティの世界 / Do SREs Dream of AWS Observability?
aoto
PRO
0
280
元祖 AIOps! メトリクス異常検知からはじめよう 〜さようなら Lookout for Metrics〜 / The Original AIOps! Let's get started with Metrics Anomaly Detection - Good-bye Lookout for Metrics
aoto
PRO
0
240
Dive Deep in Cloud Run: Automatic Base Image update
aoto
PRO
0
1k
CloudWatch Application Signals と APM の入門 / Introduction to CloudWatch Application Signals and APM
aoto
PRO
2
1.5k
Recap『Platform Engineering 入門: Golden Path の構築と活用』
aoto
PRO
0
1.1k
Two different ways to export AWS CloudWatch Metrics
aoto
PRO
0
1.2k
Other Decks in Technology
See All in Technology
セキュリティの民主化は何故必要なのか_AWS WAF 運用の 10 の苦悩から学ぶ
yoh
1
130
あなたの声を届けよう! 女性エンジニア登壇の意義とアウトプット実践ガイド #wttjp / Call for Your Voice
kondoyuko
4
440
プロダクトエンジニアリング組織への歩み、その現在地 / Our journey to becoming a product engineering organization
hiro_torii
0
130
TechLION vol.41~MySQLユーザ会のほうから来ました / techlion41_mysql
sakaik
0
180
生成AI時代 文字コードを学ぶ意義を見出せるか?
hrsued
1
260
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
260
Liquid Glass革新とSwiftUI/UIKit進化
fumiyasac0921
0
210
Github Copilot エージェントモードで試してみた
ochtum
0
100
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
160
Witchcraft for Memory
pocke
1
300
地図も、未来も、オープンに。 〜OSGeo.JPとFOSS4Gのご紹介〜
wata909
0
110
Oracle Cloud Infrastructure:2025年6月度サービス・アップデート
oracle4engineer
PRO
2
240
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
The Invisible Side of Design
smashingmag
299
51k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
48
5.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Six Lessons from altMBA
skipperchong
28
3.8k
Producing Creativity
orderedlist
PRO
346
40k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Transcript
CloudWatch で APM 18th Jan, Jr. Champions 勉強会 #8 Kento
Kimura
Observability = Observe + Ability
O11y = Observe + Ability
APM APM = Application Performance Monitoring
Self-Introduction • 所属:Technical Solutions / Sales Engineer • 担当:パブリッククラウドのアーキテクト知識を活かした Datadog
のプリセールス技術支援 • 資格:Google Cloud 全 11 資格、AWS 全 12 資格、Azure 13 資格 • 表彰:Google Cloud Partner Top Engineer 2023-24 2022-23 APN All AWS Certifications Engineer 2023 Japan AWS Jr.Champion 木村 健人 (Kento Kimura) Datadog Japan GK History データセンター運用保守 → パブリッククラウド技術支援 → プリセールス技術支援 Community Jr. Champions Meetup, JAWS, Jagu'e'r, CloudNative Partner Top Engineer 2023 Partner Top Engineer 2024
Agenda 6 01 そもそも APM ってなに? 02 AWS の APM
ツール 03 では CloudWatch の APM とは? 04 まとめ
7 そもそも APM ってなに?
APM = Application Performance Monitoring
Application Performance Monitoring とは ソフトウェアツールとテレメトリデータを使用して、 ビジネスクリティカルなアプリケーションのパフォーマンスをモニタリングするプロセス ソフトウェアツール: 監視エージェントや Software Development
Kit(SDK) などのツール AWS では CloudWatch Agent, X-Ray SDK など テレメトリデータ: CPU 使用率・応答時間・エラー率・レイテンシーなどの監視情報 APM では主にアプリケーションの指標である RED メトリクスを重視 9 引用「APM (アプリケーションパフォーマンスモニタリング ) とは何ですか ?」https://aws.amazon.com/jp/what-is/application-performance-monitoring/ “ “
RED メトリクスのいろは • Requests: アプリケーション処理がリクエストされた回数。処理の種類毎に分類する。 • Errors: アプリケーションエラーの発生した回数。エラー率を指標とすることが多い。 • Duration:
アプリケーションの処理にかかる時間。p50, p75, p90, p95 などを参照する。 RED メトリクスのようなアプリケーションのメトリクスを把握することで、 CPU・メモリ・ディスクの使用率、ネットワークトラフィックなどのメトリクスに比べ より利用者の体験に即した指標をもとに意思決定ができる。 他にも USE メソッドやゴールデンシグナルなどがあるが、今回は割愛… アプリケーション処理の統計メトリクスだけではなく、 処理毎のパフォーマンスを見るには分散トレーシングが重要 10
分散トレーシングのいろは アプリケーションの処理毎にパフォーマンスを記録する手法は、 従来はアプリケーションログを詳細に設計する必要があった。 処理毎にログを記録すると、情報量とストレージ容量が膨大となる アプリケーション処理の開始・終了時点と最低限のコンテキストを記録して HTTP リクエストでアプリケーション間の依存関係を可視化する 分散トレーシング:情報量を削減し、複雑な処理をフレームグラフで可視化する HTTP リクエストを行うマイクロサービス間の処理も可視化できる
フレームグラフ: 11
12 AWS の APM ツール
AWS の Application Performance Monitoring 13 ADOT (AWS Distro for
OpenTelemetry) AWS X-Ray
AWS の APM はどうなっていたか AWS X-Ray • 2017/4 GA(一般公開) •
CloudWatch と別のエコシステム ◦ SDK でコードに組み込み ◦ Daemon で監視情報の集約 ◦ API で AWS へ連携 ◦ Browser で可視化 • 2019/11 CloudWatch ServiceLens • CloudWatch との連携(メトリクス・ログ) ◦ X-Ray と CloudWatch のテレメトリ(監視データ)が、 AWS Console 上で統合される 14 AWS X-Ray AWS Tools and SDKs AWS CLI X-Ray SDKs AWS Cloud Control API AWS Management Console X-Ray daemon
AWS の APM はどうなっていくか(予想) Amazon CloudWatch • AWS 上のリソースをリアルタイムに監視するソリューション •
2019/11 Console 上の X-Ray 統合 • 2021/11 ADOT(AWS Distro for OpenTelemetry) がアプリケーショントレースをサポート • 2023/8 CloudWatch Agent の X-Ray, OpenTelemetry サポート • 2023/11(AWS re:Invent 2023) CloudWatch Application Signals(preview) が発表 CloudWatch のエコシステムを中心に APM のサポートを拡大していきそう 15
16 では CloudWatch の APM とは?
CloudWatch の APM = Application Signals Amazon CloudWatch Application Signals(preview)
CloudWatch Agent のデプロイできる、EKS, ECS, EC2 において、 X-Ray, ADOT の自動計装エージェントがアプリケーションパフォーマンスを監視するソリューション ※APM は言語毎に実装が異なり、現在は Java のみの対応 • X-Ray 独自の利点(SQS, SNS, EventBridge etc のトレース)を保ちながら、OSS である OpenTelemetry の恩恵を受けれらる • OpenTelemetry のエコシステムの拡大に合わせて、Application Signals も対応言語や 収集できるテレメトリを拡大できる • Management Console 上では Application Signals の専用ビューが用意されており、 サービスやトポロジーを監視するための情報を可視化できる 17
Appendix: 手動計装と自動計装 手動計装(Manual instrumentation) アプリケーションコードに 手動でSDK やライブラリを組 み込み、監視テレメトリデータを生成する 処理をコードに実装して、トレースを行う Goのコードへの実装例:
18 自動計装(Auto instrumentation) アプリケーションコードに変更を加えずに、 アプリケーション処理を動的にイジェクト(Java, Python) するツールを実装して、トレースを行う Java への実装例:.jar ファイル取得と-javaagent:引数の設定 import ( "os" "github.com/aws/aws-xray-sdk-go/awsplugins/ec2" "github.com/aws/aws-xray-sdk-go/xray" ) func init() { // conditionally load plugin if os.Getenv("ENVIRONMENT") == "production" { ec2.Init() } xray.Configure(xray.Config{ ServiceVersion: "1.2.3", }) } 引用「AWS X-Ray デベロッパーガイド」 https://docs.aws.amazon.com/ja_jp/xray/latest/devguide/ $ wget \ https://github.com/aws/aws-xray-java-agent/releases/latest/ download/xray-agent.zip disco ├── disco-java-agent.jar └── disco-plugins ├── aws-xray-agent-plugin.jar ├── disco-java-agent-aws-plugin.jar ├── disco-java-agent-sql-plugin.jar └── disco-java-agent-web-plugin.jar
19 まとめ
Amazon CloudWatch Application Signals 徹底解説 21 Application Signals についてまとめています!本日のお話しの続きで是非ご覧ください!
Thank you