Deployment Integrations
On-premise Integrations
Platform Integrations

Metric Configurations

Thundra Node.js Metrics

Metric support provides essential information regarding the performance of your Node.js lambda functions, which translate to carefully calculated stats. It lets you examine:

  • Invocation Counts

  • Invocation Durations

  • Memory Usages

  • Process Memory Usages

  • CPU Percentages

  • Disk IO

  • Thread Count

Configuring Metrics

By simply importing thundra from @thundra/core, all metrics mentioned above are ready to be collected. However, collecting metrics is disabled by default. You need to enable it programmatically or through the environment variables.

Enabling Sending Metrics

Metric monitoring can be enabled by setting the relevant configuration parameters. These parameters include the thundra_agent_lambda_metric_disable environment variable and the disable_metric object initialization parameter.

Enabling metric programmatically on agent initialization

Programmatic Metric Configuration
const thundra = require("@thundra/core")({
metricConfig: {
enabled: true,
},
});

Enabling metric using environment variables

Metric Configuration via Environment Variables
thundra_apiKey: ${self:custom.thundraApiKey}
thundra_agent_lambda_metric_disable: false

‚Äč