Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] API Gateway metrics missing #1331

Closed
1 task done
markspace opened this issue Mar 6, 2024 · 0 comments · Fixed by #1332
Closed
1 task done

[BUG] API Gateway metrics missing #1331

markspace opened this issue Mar 6, 2024 · 0 comments · Fixed by #1332
Labels
bug Something isn't working

Comments

@markspace
Copy link

markspace commented Mar 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues

YACE version

v0.57.0

Config file

apiVersion: v1alpha1
discovery:
  exportedTagsOnMetrics:
    apigateway:
      - fp-component
  jobs:
  - type: apigateway
    regions:
      - us-east-2
    searchTags:
      - key: fp-component
        value: .+
    dimensionNameRequirements:
      - ApiName
      - Method
      - Resource
      - Stage
    metrics:
      - name: Count
        statistics:
          - SampleCount
      - name: Latency
        statistics:
          - Average
      - name: IntegrationLatency
        statistics:
          - Average
      - name: 4XXError
        statistics:
          - Sum
      - name: 5XXError
        statistics:
          - Sum

Current Behavior

wget -q -O - http://localhost:5000/metrics| cut -d '{' -f 1 | grep -v -e '^#' -e yace | sort -u
Returns nothing

If I remove the dimensionNameRequirements from the config, then I get

aws_apigateway_count_sample_count
aws_apigateway_info

Expected Behavior

On version v0.56.0 and earlier
wget -q -O - http://localhost:5000/metrics| cut -d '{' -f 1 | grep -v -e '^#' -e yace | sort -u
returns

aws_apigateway_4_xxerror_sum
aws_apigateway_5_xxerror_sum
aws_apigateway_count_sample_count
aws_apigateway_info
aws_apigateway_integration_latency_average
aws_apigateway_latency_average

Steps To Reproduce

  1. AWS account with REST API Gateway in us-east-2 (for the config above)
  2. run yace with the above config
  3. If version is 0.57 then no API metrics, and only get info if no dimensionNameRequirements
  4. If version 0.56 or below - get various api gw metrics

Anything else?

No response

@markspace markspace added the bug Something isn't working label Mar 6, 2024
cristiangreco added a commit that referenced this issue Mar 6, 2024
…rces

Reverts almost entirely #1067

I wrongly deleted usage of the ApiGateway API, but the associator code
can't work correctly unless resources are filtered by ApiId first.

Added a comment in filters code to explain why we need to keep this
logic around.

Fixes #1331
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant