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
Oracle Functionsのオブザーバビリティ / Oracle Functions O...
Search
oracle4engineer
PRO
May 31, 2022
Technology
1.3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Oracle Functionsのオブザーバビリティ / Oracle Functions Observability
oracle4engineer
PRO
May 31, 2022
More Decks by oracle4engineer
See All by oracle4engineer
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.4k
Deep Data Security 機能解説
oracle4engineer
PRO
2
290
Oracle Cloud Infrastructure:2026年6月度サービス・アップデート
oracle4engineer
PRO
1
570
Oracle AI Databaseデータベース・サービスのメンテナンス(BaseDB/ExaDB-D/ExaDB-XS)
oracle4engineer
PRO
4
1.9k
Oracle AI Database@Google Cloud:サービス概要のご紹介
oracle4engineer
PRO
6
1.6k
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2.1k
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
3.2k
CrossplaneによるCloud Native Control Plane
oracle4engineer
PRO
0
130
Other Decks in Technology
See All in Technology
Empower GenAI with Agile - あなたのアジャイルが生成AIのバフになる仕組み
hageyahhoo
1
150
Control Planeで育てるBtoB SaaSの認証基盤 - SRE NEXT 2026
pokohide
1
2k
LiDAR SLAMの実装とセンサ融合 ~Lie群からContinuous-Time LIOまで~
naokiakai
1
1k
ループエンジニアリングでE2Eテストを実践
noriyukitakei
0
320
プロンプト_きのこカンファレンス2026_LT
yurufuwahealer
0
150
SREとQA 二人三脚で進めるSLO運用/sre-qa-slo
sugitak
0
110
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
3
2.1k
脱金融のフューチャー・デザイン / Future Design Beyond Finance
ks91
PRO
0
140
生成AIの活用/high_school2026
okana2ki
0
110
完全自律ロボットを作りたくて、先に開発を自律させた話(ROS Japan UG #63 LT)
rryz09
0
430
クラウド上のデータ復旧で見落としがちな制約: 医療系 SaaS の BCP 設計から得た教訓
kakehashi
PRO
0
3k
事業価値を⽣み出すSREへ SREが担うべき意思決定の5層
kenta_hi
2
2.9k
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
55
10k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
How to make the Groovebox
asonas
2
2.3k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Un-Boring Meetings
codingconduct
0
340
Mind Mapping
helmedeiros
PRO
1
280
My Coaching Mixtape
mlcsv
0
170
A Tale of Four Properties
chriscoyier
163
24k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
Building Applications with DynamoDB
mza
96
7.1k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Transcript
Oracle Functionsのオブザーバビリティ Subhead goes here on one line Name 日本オラクル株式会社
May, 2022
Copyright © 2022, Oracle and/or its affiliates 2 1. Oracle
Functions – Metrics 2. Oracle Functions – Logs 3. Oracle Functions – Traces Agenda
Oracle Cloud Observability and Management Platform Copyright © 2022, Oracle
and/or its affiliates 3 Logging Logging Analytics Application Performance Monitoring Database Management Operations Insights Service Connector Hub オンプレミス、クラウドのOracle DBの リソース監視、パフォーマンス分析 OSやDBのキャパシティプランニングや リソースの需要予測 Monitoring Events Notifications Streaming OS Management Functions コンピュート、ネットワークなど各OCIリソー スの状態を監視するメトリックを管理 メール、SMS、Slack等のアラート メッセージを発信 クラウド上のリソースの変化を捉え、検知 した内容に応じたアクションの実行 インフラストラクチャを必要としないサー バーレスなアプリケーション実行環境 大量のデータストリームを処理するフルマ ネージドな分散メッセージング基盤 OS上で稼働するアプリケーションのワーク ロードの管理やリソース監視 Observability & Management サービス Platform サービス 監査ログやネットワーク、ストレージ・ログ などのOCIサービスに関するログ管理 様々な種類のログを集約し、機械学習 を用いた高度な分析とビジュアライズ Loggingのログを別のサービスに 転送するサービス連携基盤 Javaアプリケーションやマイクロサービスの パフォーマンス分析 Logs Metrics Traces
Copyright © 2022, Oracle and/or its affiliates 4 Oracle Functions
– Metrics
• OCIの各サービスの性能や状態を表すメトリックを収集・監視 • コンピュート・インスタンスのCPU, メモリ, ネットワーク送受信 • ロードバランサーのインバウンドリクエスト, 帯域幅 •
ブロック・ボリュームのI/Oスループットなど • 事前定義済みのダッシュボードが提供され特別な設定は必要なし • メトリック・エクスプローラーによる詳細なメトリック分析 • ユーザー自身によるカスタム・メトリックの作成 • ヘルスチェックによるコンピュートのサービス・ポートを監視 • メトリックの保持期間は90日間 • メトリックに対してアラームを作成可能 • アラームはNotificationsサービスと連携する事で、メール、 Slack等による通知やFunctionsサービスを起動し、特定のア クションを実行するなど、対応を自動化することも可能 Monitoring Copyright © 2022, Oracle and/or its affiliates 5 CPU: 80 CPU: 90 CPU: 40 CPU: 50 Customer Applications, Services, Resources OCI Services METRICS ALARMS Notifications Monitoring
Oracle Functionsの実行をモニターし、以下のメトリックを自動的に収集 ディメンション: メトリック・データをフィルターしたりグルーピングするもの • applicationId: ファンクションを管理するアプリケーションのOCID • resourceId: ファンクションのOCID
• responsetype: ファンクションが呼び出されたときのレスポンス(Success, Error, Throttled) Oracle Functionsのメトリック Copyright © 2022, Oracle and/or its affiliates 6 メトリック ディメンション 概要 FunctionExecutionDuration applicationId, resourceId ファンクションの合計実行時間 [ms] FunctionInvocationCount applicationId, resourceId ファンクションの呼び出しの合計数 [count] FunctionResponseCount applicationId, resourceId, responseType ファンクション・レスポンスの合計数 [count]
収集したメトリックは、事前定義済みのダッシュボードとして提供 Function Metric Copyright © 2022, Oracle and/or its affiliates
7
Copyright © 2022, Oracle and/or its affiliates 8 Oracle Functions
– Logs
OCI内のログを有効化し、ログデータの簡易的な分析と連携管理を提供 以下の3種類のログに対応 監査ログ • デフォルトで収集されるOCIコンソールやAPIの操作ログ サービス・ログ • OCIネイティブなサービスから生成されるログ • ファンクション,
ロードバランサー, オブジェクト・ストレージ, VCN Flow Logs等 カスタム・ログ • Linux syslogやWindows イベント等のOSで管理されるログ 監査ログは最大365日、サービス/カスタムログは最大6カ月保持 オブジェクトストレージやLogging Analyticsをログデータを移動して、ログの 永続的な保管が可能 高度なログ分析やアラート、ビジュアライゼーションにはLogging analyticsと 連携して使用するのがもっとも効果的 Logging Copyright © 2021, Oracle and/or its affiliates 9 サービス・ログ Logging Object Storage VCN Flow Logs Load Balancer Auditing 監査・ログ カスタム・ログ
Functionsのログを有効化した場合、サービス・ログとしてOCI Loggingに出力される • アプリケーション(=ファンクションの管理単位)単位に出力される • 呼びだし時のログ(呼び出しに要した時間、失敗時のエラーコード)は自動的に収集される • 実行ログは、標準/標準エラー出力に出力したものが自動的に収集される OCI上で統合的な運用が可能 •
Service Connector Hubとの併用で、ログ出力を元にした操作が可能 OCI Functionsのログ Copyright © 2022, Oracle and/or its affiliates 10 console.log(‘debug log’); // Node.js System.err.println(“debug log”); // Java logステートメント アプリケーション単位に ログを有効化 標準/標準エラー出力に出力したログをLoggingの インターフェースを利用して参照
Oracle Functionsのログは、アプリケーション(=ファンクションの管理単位)単位に特定のログ・グループ (=ログの管理単位)に出力される ログの管理単位 Copyright © 2022, Oracle and/or its
affiliates 11 function-a function-b アプリケーション #1 ・・・ function-c function-d アプリケーション #2 ・・・ ・・・ Oracle Functions Functions OCI Logging Logging ログ・グループ #1 app1_invoke app2_invoke ・・・ ログ・グループ #2 app3_invoke app4_invoke ・・・ function-a ログ function-b ログ ・・・
出力される内容 Copyright © 2022, Oracle and/or its affiliates 12 {
"datetime": 1636351104724, "logContent": { "data": { "applicationId": "ocid1.fnapp.oc1.ap-tokyo-1.aaaaaaaaagi5fasv4qxkb3vootiz77ugdozpqnqvnxvruusa2pzioyb7pptq", "containerId": "01FKZ208K3000000000000024J", "functionId": "ocid1.fnfunc.oc1.ap-tokyo-1.aaaaaaaaei3thjhk56scniiex44zthk7osi22aay4cjomkumgtmtfd34y67a", "message": "INFO: tracingContext.functionName: fn-tracing", "opcRequestId": "/01FKZ1ZVFZ000000000000V7NJ/01FKZ1ZVFZ000000000000V7NK", "requestId": "/01FKZ1ZVFZ000000000000V7NJ/01FKZ1ZVFZ000000000000V7NK", "src": "STDERR" }, "id": "2cf9c27d-c11f-4d6a-ae84-ced28c7b5bae", "oracle": { "compartmentid": "ocid1.compartment.oc1..aaaaaaaanjtbllhqxcg67dq7em3vto2mvsbc6pbgk4pw6cx37afzk3tngmoa", "ingestedtime": "2021-11-08T05:58:36.340Z", "loggroupid": "ocid1.loggroup.oc1.ap-tokyo-1.amaaaaaassl65iqambbuvvbisri2xehhg274e4fjej2qod4v7raw32dr253a", "logid": "ocid1.log.oc1.ap-tokyo-1.amaaaaaassl65iqauyddmj3zzrfgbvoublwzxrvktwmdeutz2jjuqxcgasiq", "tenantid": "ocid1.tenancy.oc1..aaaaaaaa3mb7wrcy2ls3u3jsy2soq5ck3lc3q4mczitpdaymbuazc5tkguca" }, "source": "sandbox-app", "specversion": "1.0", "subject": "fn-tracing", "time": "2021-11-08T05:58:24.724Z", "type": "com.oraclecloud.functions.application.functioninvoke" } } 出力内容 アプリケーション名 Function名 同一Functionの複数コンテナの出力が混在する場合これで識別可能 標準出力(STDOUT) or 標準エラー出力(STDERR)
Copyright © 2022, Oracle and/or its affiliates 13 Oracle Functions
– Monitoring
アプリケーションのパフォーマンスを可視化し、問題の根本的原因を サーバーおよびユーザー・サイドから分析し解決をサポート • 分散トレーシング • トレースデータに基づいてアプリケーションのどの箇所が、または、 サービス間の連携でどのサービスがボトルネックなのかを可視化 • Open Tracing,
OpenTelemetry互換 • Javaアプリケーション実行環境の監視 • WebLogic, Tomcat, TomEE, Spring Boot • ブラウザ・エージェントにより、実際のユーザーのブラウザ操作を記 録しページ・ロードやパフォーマンスを監視 • アプリケーションやAPIのエンドポイントに対して定常的にリクエスト を実行し、死活監視およびパフォーマンス監視を実行 • 定義済みダッシュボードによる効率的なモニタリング Application Performance Monitoring(APM) Copyright © 2022, Oracle and/or its affiliates 14 Application Performance Monitoring アプリケーション 監視 エンドユーザー 性能監視
Application Performance Monitoring (APM) との統合によってFunctionのトレースが可能に • Function間の呼び出しや、他サービスの呼び出しに関連する情報をAPMでend-to-endに可視化 • 障害発生時の原因特定や性能上のボトルネックとなっている箇所の特定に貢献 Application
Performance Monitoring(APM)を用いたFunctionのトレース Copyright © 2022, Oracle and/or its affiliates 15 スパンの詳細情報 • 操作/処理名 • トレース開始からの経過時間 • スパンの実行時間 • トレースID • スパンID • etc.
• デフォルト・スパン • 関数呼び出し全体(リクエスト~レスポンス)の実行コンテキストの情報を提供する • ポリシーやFunctionの設定を実施後、関数コードに変更なしで自動的に提供される(※後述) • カスタム・スパン • 任意の範囲(スパン)の情報を提供する
• メソッドの処理開始~終了、メソッド内の特定処理の開始~終了 etc. • デフォルト・スパンよりも細かい単位で情報の取得が可能 • Zipkin等のクライアント・ライブラリを用いて、関数コード中に直接スパン定義を埋め込む デフォルト・スパン/カスタム・スパン Copyright © 2022, Oracle and/or its affiliates 16 デフォルト・スパン カスタム・スパン トレース: コンポーネント間を跨ぐイベントまたはトランザクションの因果連鎖の指標のことで、1つ以上のスパンで構成される スパン: トレース内の名前、開始時間や期間の情報を持つ操作・作業の論理単位のこと
関数呼び出し全体(リクエスト~レスポンスまで)の実行コンテキストの情報をOCI上の設定のみで自動的に提供 トレースの有効化 Copyright © 2022, Oracle and/or its affiliates 17
Functions Policies Allow service FaaS to use apm-domains in compartment <compartment-name> Allow group <group-name> to use apm-domains in comparetment <compartment-name> アプリケーション単位のトレース可否の設定 + ファンクション単位のトレース可否の設定 Application Performance Monitoring
Copyright © 2022, Oracle and/or its affiliates 18 Thank you
None