Thundra APM
Search…
Deployment Integrations
Powered By GitBook
Configuring Metrics for Node.js

Thundra Node.js Metrics

Metric support provides essential information regarding the performance of your Node.js Lambda functions, which translate to carefully calculated statistics. You can 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 the metrics mentioned above are ready to be collected; however, metrics are disabled by default. You need to enable them programmatically or through 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
1
const thundra = require("@thundra/core")({
2
metricConfig: {
3
enabled: true,
4
},
5
});
Copied!

Enabling metric using environment variables

Metric Configuration via Environment Variables
1
thundra_apiKey: ${self:custom.thundraApiKey}
2
thundra_agent_lambda_metric_disable: false
Copied!
Last modified 1yr ago