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

Duplicate Metrics for Lambda function #668

Open
1 task done
pratikgedia opened this issue Sep 20, 2022 · 1 comment
Open
1 task done

Duplicate Metrics for Lambda function #668

pratikgedia opened this issue Sep 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@pratikgedia
Copy link

pratikgedia commented Sep 20, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Version :: v0.33.0-alpha
v0.40.0-alpha

aws_lambda_invocations_sum{account_id="072xxxx", dimension_FunctionName="authorizer-function-AuthorizerFunction-xxxxxxxx", dimension_Resource="authorizer-function-AuthorizerFunction-xxxxxxxx", instance="yace:5000", job="yace", name="arn:aws:lambda:eu-west-2:oxxxxxx:function:authorizer-function-AuthorizerFunction-xxxxxxxx", region="eu-west-2", tag_Environment="Production"}
741
aws_lambda_invocations_sum{account_id="072xxxxx", dimension_FunctionName="authorizer-function-AuthorizerFunction-xxxxxxxx", instance="yace:5000", job="yace", name="arn:aws:lambda:eu-west-2:o7xxxxxxx:function:authorizer-function-AuthorizerFunction-xxxxxxxx", region="eu-west-2", tag_Environment="Production"}
742

Expected Behavior

aws_lambda_invocations_sum{account_id="o7xxxxxxx", dimension_FunctionName="authorizer-function-AuthorizerFunction-xxxxxxxx", dimension_Resource="authorizer-function-AuthorizerFunction-xxxxxxxx", instance="yace:5000", job="yace", name="arn:aws:lambda:eu-west-2:o7xxxxxxx:function:authorizer-function-AuthorizerFunction-xxxxxxxx", region="eu-west-2", tag_Environment="Production"}
741

Steps To Reproduce

Yace Config for pulling Lambda Metrics

...

  • type: lambda
    regions:
    - eu-west-2
    searchTags:
    - key: Environment
    value: Production
    metrics:
    - name: Duration
    statistics:
    - Sum
    - Maximum
    - Minimum
    - Average
    period: 300
    length: 600
    - name: Invocations
    statistics:
    - Sum
    period: 300
    length: 600
    - name: Errors
    statistics:
    - Sum
    period: 60
    length: 600
    - name: ConcurrentExecutions
    statistics:
    - Maximum
    period: 300
    length: 600

Anything else?

No response

@pratikgedia pratikgedia added the bug Something isn't working label Sep 20, 2022
@tbondarchuk
Copy link

That's because Lambda metrics have two dimensions, FunctionName and Resource and sometimes it's both for one lambda, sometimes it's only one, no idea why.
AWS docs
cli to check: aws cloudwatch list-metrics --namespace AWS/Lambda --metric-name Errors

Can be fixed by limiting yace to single dimension using dimensionNameRequirements like follows:

      jobs:
      - regions:
        - eu-west-1
        type: lambda
        period: 300
        length: 3600
        dimensionNameRequirements:
          - FunctionName
        metrics:
          - name: Errors
            statistics:
            - Sum

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
Development

No branches or pull requests

2 participants