Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Lambda Insight Memory Utilization metrics #195

Open
ADailler opened this issue Sep 23, 2021 · 3 comments
Open

Lambda Insight Memory Utilization metrics #195

ADailler opened this issue Sep 23, 2021 · 3 comments

Comments

@ADailler
Copy link

ADailler commented Sep 23, 2021

This is a Bug Report

Description

For bug reports:

  • What went wrong?

    • Cannot use Lambdas Insight Metrics
  • What did you expect should have happened?

    • Use Lambda Insight memory_utilization metric
  • What was the config you used?

custom:
  lambdaInsights:
    defaultLambdaInsights: true #enables Lambda Insights for all functions
  alerts:
    stages:
      - prod
    topics:
      alarm: ${self:service}-${self:provider.stage}-alerts-alarm
      notifications:
        - protocol: email
          endpoint: ${file(./config.${self:provider.stage}.yml):EMAIL_ENDPOINT}
    definitions:
      memoryUsage:
        actionsEnabled: false
        description: 'Memory usage is too high'
        namespace: 'LambdaInsights'
        metric: memory_utilization # also try memoryUtilization
        threshold: 90
        statistic: Maximum
        period: 300
        evaluationPeriods: 1
        datapointsToAlarm: 1
        comparisonOperator: GreaterThanThreshold
    alarms:
      - functionErrors
      - memoryUsage
  • What stacktrace or error message from your provider did you see?
    • I can't see any error but the alarm is not connected to cloudwatch metric

For feature proposals:

  • What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
  • If there is additional config how would it look

Similar or dependent issues:

  • no

Additional Data

  • Serverless Framework Version:
    • Framework Core: 2.43.1
    • Plugin: 5.1.4
    • SDK: 4.2.2
    • Components: 3.10.1
  • Stack Trace:
  • Provider Error messages:
@evvo
Copy link

evvo commented Mar 4, 2022

It appears that for the LambdaInsights namespace, the dimension name for the function should be function_name and not FunctionName in the generated CloudFormation template:

"Dimensions": [
  {
    "Name": "FunctionName",
    "Value": {
      "Ref": "NameOfLambdaLambdaFunction"
    }
  }
],

should be:

"Dimensions": [
  {
    "Name": "function_name",
    "Value": {
      "Ref": "NameOfLambdaLambdaFunction"
    }
  }
],

@abduncan
Copy link

abduncan commented Jun 7, 2022

Any movement on this? I am attempting use this metric, and it is not firing.

@dkefal
Copy link

dkefal commented Jun 14, 2023

We are facing the same problem any news on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants