Ingesting data for AWS API Gateway while making requests to a REST API, the following behavior can be observed:

We get 4 documents, each with varying dimensions. This is similar to the ApiGateway CloudWatch metric groupings for REST APIs:
- Across All APIs (no dimensions, only Count and Data Processed metrics)
- By Api Name (ApiName dimension)
- By Stage (ApiName, Stage dimensions)
- By Method (ApiName, Stage, Resource, Method dimensions)
If the Detailed metrics option is set to Inactive in the Logs and tracing settings for the API Stage, then only 3 documents will be present (as that option enables metrics tracing for each specific method):

Since we can't guarantee the end user will enable Detailed metrics, we can't just consider only the documents will all dimensions.
With Detailed Metrics being an an opt-in feature rather than the default setting, one approach to ensure consistent data on the dashboard, whether Detailed Metrics is on or off, is to exclude these additional documents using dimension filters.
Ingesting data for AWS API Gateway while making requests to a REST API, the following behavior can be observed:

We get 4 documents, each with varying dimensions. This is similar to the
ApiGatewayCloudWatch metric groupings for REST APIs:If the

Detailed metricsoption is set to Inactive in the Logs and tracing settings for the API Stage, then only 3 documents will be present (as that option enables metrics tracing for each specific method):Since we can't guarantee the end user will enable
Detailed metrics, we can't just consider only the documents will all dimensions.With Detailed Metrics being an an opt-in feature rather than the default setting, one approach to ensure consistent data on the dashboard, whether Detailed Metrics is on or off, is to exclude these additional documents using dimension filters.