nerdswords / yet-another-cloudwatch-exporter

Prometheus exporter for AWS CloudWatch - Discovers services through AWS tags, gets CloudWatch metrics data and provides them as Prometheus metrics with AWS tags as labels
Apache License 2.0
953 stars 328 forks source link

[BUG] ApiGateway metrics being skipped "metric":"IntegrationLatency","msg":"skipping metric unmatched by associator" #1471

Open overlordchin opened 1 month ago

overlordchin commented 1 month ago

Is there an existing issue for this?

YACE version

0.61.2

Config file

`apiVersion: v1alpha1 discovery: jobs:

Current Behavior

ApiGateway v1 metrics appear to work correctly and show up in the metrics page and prometheus. V2 have log messages as follows: {"account":"redacted","arn":"","caller":"discovery.go:248","dimensions":"ApiName=my-api,Resource=/myenResource,Stage=mystage,Method=POST","job_type":"AWS/ApiGateway","level":"debug","metric":"IntegrationLatency","msg":"skipping metric unmatched by associator","region":"us-east-1","ts":"2024-07-16T21:08:36.186928023Z","version":"0.57.1"}

Expected Behavior

metrics are not skipped and show up in prometheus and are searchable by dimensions that show up on v1 resources

Steps To Reproduce

  1. ensure metrics are visible with dimensions in cloudwatch for given resource
  2. add above configuration to yace
  3. restart yace to ensure config is loaded
  4. read log messages from yace and observe no errors.
  5. add debug flag to log and restart yace to observe skipping messages

Anything else?

We have tried both with and without the enable max dimension association and aws-sdk-v2 features, neither seems to have any impact. It is unclear why these are being skipped and adding required dimension names causes it to find no metrics at all and even the v1 metrics disappear

Additionally we have tried adding dimension requirements which causes ALL apigateway metrics to be skipped