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
adot-collectorを本番環境に導入してみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
clouddev-code
September 26, 2023
770
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
adot-collectorを本番環境に導入してみた
clouddev-code
September 26, 2023
More Decks by clouddev-code
See All by clouddev-code
Regional_NAT_Gatewayについて_basicとの違い_試した内容スケールアウト_インについて_IPv6_dual_networkでの使い分けなど.pdf
cloudevcode
1
910
Grafana_LokiをECS_Fargateで構築する観点公開版.pdf
cloudevcode
0
46
ADK_for_Java.pdf
cloudevcode
1
100
initContainerをECSで実現したい.pdf
cloudevcode
0
37
VPC_Lattice検討したが_採用しなかった話.pptx.pptx.pdf
cloudevcode
0
30
Presentation_-_コンテナイメージ高速化技術.pptx.pdf
cloudevcode
0
37
GitHub_Copilot_AgentでするMCP_Streamable_HTTPまで.pdf
cloudevcode
0
120
EKS_Auto_Mode_Deep_Live.pdf
cloudevcode
0
58
re_invent_2024アップデートで実現可能なアーキテクチャを考える.pdf
cloudevcode
1
320
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
140
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
530
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Side Projects
sachag
455
43k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
The SEO Collaboration Effect
kristinabergwall1
1
480
Typedesign – Prime Four
hannesfritz
42
3.1k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
210
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
エンジニアに許された特別な時間の終わり
watany
107
250k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
My Coaching Mixtape
mlcsv
0
140
Transcript
adot-collectorを本番環境に導入してみた
About us Soushi Hiruta コンテナを活用したマイクロサービス基盤設計、構築 SPA、BackendAPI基盤設計、構築 AWS CDK歴 1.5年ほど
CodeCatalystのDev Environmentsでpythonがaliasバージョン固定されている CodeCatalystのDev Environmentsでpyenvで別のバージョンいれても。。。 CodeCatalystのDev EnvironmentsはAmazonLinux2 /etc/profile.d/python3_default.sh
Agenda • 可観測性 • マイクロサービスでの可観測性の課題 • 収集方法 • 構成図 •
変更前 • 変更前の課題 • AWS Distro for OpenTelemetry Collector • 構成図 • 本番環境に適用して発生した課題 • まとめ
可観測 • マイクロサービス的システムでは分散システムになって、メトリクス だけは不十分 AWS Distro for OpenTelemetryを試してみた https://zenn.dev/kobayashi_m42/articles/try-aws-distro-for-opentelemetry
可観測
解決策
収集方法 • Cloudwatch Agent • AWS Distro for Open Telemetry
( ADOT )
全体構成図 CloudwatchAgent
CloudwatchAgent • ヒストグラムに対応していない、jvm metricsなどコンテナ単位で収 集しているので、長期的な傾向がみずらい • Cloudwatch logs、カスタムメトリクスの課金 •
AWS Distro for Open Telemetry
構成図 •
コンフィグ https://github.com/aws-observability/aws-otel-collector/blob/main/config/ecs/ecs-amp-prometheus.yaml メトリクス取得間隔、取得先の設定 左の例だと20s間隔で取得
コンフィグ https://github.com/aws-observability/aws-otel-collector/blob/main/config/ecs/ecs-amp-prometheus.yaml AMP Amazon Managed Prometheusの エンドポイントを設定
コンフィグ https://github.com/aws-observability/aws-otel-collector/blob/main/config/ecs/ecs-amp-prometheus.yaml Containerinsightsで取得できるcpu、メモ リも取得できる
コンフィグ https://github.com/aws-observability/aws-otel-collector/blob/main/config/ecs/ecs-amp-prometheus.yaml 受信(receivers)、処理(processors)、 exporterの設定を行う
AMPメトリクスのグラフ化 https://docs.aws.amazon.com/prometheus/latest/userguide/AMP-onboard-query-standalone-grafana.html Amazon managed for Grafanaなど利用する。 AWS Signature Version 4
(SigV4) authenticationに対応したGrafanaである必要あり
問題ないようにみえたが。。。 •
• メモリ使用量が右肩上がり。。。
Memory Limiter Processor https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterproce ssor#memory-limiter-processor
Memory Limiter Processor https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterproce ssor#memory-limiter-processor
Memory Limiter Processor https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterproce ssor#memory-limiter-processor processorsに、memory_limiterをいれ る
まとめ • • ADOT sidecarを利用することでenvoy metrics、jvm metricsなど をAmazon managed for
prometheusにエクスポートできる • sidecarのメモリ制限は必須
紹介したリファレンス • • オブザーバビリティ・エンジニアリング https://www.oreilly.co.jp/books/9784814400126/ • WS Distro
for OpenTelemetryを試してみた https://zenn.dev/kobayashi_m42/articles/try-aws-distro-for-opentelemetry • https://github.com/aws-observability/aws-otel-collector • https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimite rprocessor#memory-limiter-processor •