- 重要な情報
- はじめに
- 用語集
- ガイド
- エージェント
- インテグレーション
- OpenTelemetry
- 開発者
- API
- CoScreen
- アプリ内
- Service Management
- インフラストラクチャー
- アプリケーションパフォーマンス
- 継続的インテグレーション
- ログ管理
- セキュリティ
- UX モニタリング
- 管理
Amazon API Gateway は、開発者があらゆる規模で API の作成、公開、保守、監視、およびセキュリティ保護を簡単に行えるフルマネージド型サービスです。
このインテグレーションを有効にすると、Datadog にすべての API Gateway メトリクスを表示できます。
Amazon Web Services インテグレーションをまだセットアップしていない場合は、最初にセットアップします。
AWS インテグレーションページで、Metric Collection
タブの下にある API Gateway
が有効になっていることを確認します。
API Gateway ステージにカスタムタグを適用するには、次のアクセス許可を Datadog IAM ポリシーに追加します。
apigateway:GET
tag:GetResources
Datadog - AWS API Gateway インテグレーションをインストールします。
注: CloudWatch の詳細メトリクスを有効にしている場合、ステージ内のすべてのリソースまたはルートで有効にする必要があります。無効の場合、Datadog の集計値が不正確になります。
API Gateway ログを有効化します。
AWS コンソールで API Gateway に移動します。
目的の API を選択し、Stages セクションに移動します。
Logs タブで、Enable CloudWatch Logs と Enable Access Logging を有効にします。
INFO
レベルを選択して、すべてのリクエストが取得されるようにします。
CloudWatch Group の名前が api-gateway
で開始することを確認します。
JSON 形式を選択し (CLF と CSV もサポートされています)、Log format ボックスに以下を追加します。
{
"requestId":"$context.requestId",
"ip":"$context.identity.sourceIp",
"caller":"$context.identity.caller",
"user":"$context.identity.user",
"requestTime":$context.requestTimeEpoch,
"httpMethod":"$context.httpMethod",
"resourcePath":"$context.resourcePath",
"status":$context.status,
"protocol":"$context.protocol",
"responseLength":$context.responseLength
}
完了したら、Datadog Log セクションに移動し、ログを確認します。
aws.apigateway.4xx (count) | The number of client-side errors for HTTP APIs Shown as operation |
aws.apigateway.4xxerror (count) | The number of client-side errors for REST APIs Shown as operation |
aws.apigateway.5xx (count) | The number of server-side errors for HTTP APIs Shown as operation |
aws.apigateway.5xxerror (count) | The number of server-side errors for REST APIs Shown as operation |
aws.apigateway.cache_hit_count (count) | The number of requests served from the API cache Shown as operation |
aws.apigateway.cache_miss_count (count) | The number of requests served from the back end when API caching is enabled Shown as operation |
aws.apigateway.client_error (count) | The average number of requests that have a 4XX response returned by API Gateway before the integration is invoked. Shown as operation |
aws.apigateway.client_error.sum (count) | The total number of requests that have a 4XX response returned by API Gateway before the integration is invoked. Shown as operation |
aws.apigateway.connect_count (count) | The average number of messages sent to the $connect route integration. Shown as operation |
aws.apigateway.connect_count.sum (count) | The total number of messages sent to the $connect route integration. Shown as operation |
aws.apigateway.count (count) | The number call to API methods Shown as operation |
aws.apigateway.execution_error (count) | Average errors that occurred when calling the integration. Shown as operation |
aws.apigateway.execution_error.sum (count) | Total errors that occurred when calling the integration. Shown as operation |
aws.apigateway.integration_error (count) | The average number of requests that return a 4XX/5XX response from the integration. Shown as operation |
aws.apigateway.integration_error.sum (count) | The total number of requests that return a 4XX/5XX response from the integration. Shown as operation |
aws.apigateway.integration_latency (gauge) | The time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.maximum (gauge) | The maximum time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.minimum (gauge) | The minimum time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p90 (gauge) | The 90th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p95 (gauge) | The 95th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.integration_latency.p99 (gauge) | The 99th percentile time between when API Gateway relays a request to the back end and when it receives a response from the back end. Shown as millisecond |
aws.apigateway.latency (gauge) | The time between when API Gateway receives a request from a client and when it returns a response to the client. The latency includes the integration_latency and other API Gateway overhead. Shown as millisecond |
aws.apigateway.latency.maximum (gauge) | The maximum time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.minimum (gauge) | The minimum time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p50 (gauge) | The 50th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p75 (gauge) | The 75th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p90 (gauge) | The 90th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p95 (gauge) | The 95th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.latency.p99 (gauge) | The 99th percentile time between when requests are received and when responses returned Shown as millisecond |
aws.apigateway.message_count (count) | The average number of messages sent to the WebSocket API, either from or to the client. Shown as operation |
aws.apigateway.message_count.sum (count) | The total number of messages sent to the WebSocket API, either from or to the client. Shown as operation |
AWS から取得される各メトリクスには、ホスト名やセキュリティ グループなど、AWS コンソールに表示されるのと同じタグが割り当てられます。
AWS API Gateway インテグレーションには、イベントは含まれません。
AWS API Gateway インテグレーションには、サービスのチェック機能は含まれません。
ご不明な点は、Datadog のサポートチームまでお問合せください。