Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datadog-lambda-js

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datadog-lambda-js

Lambda client library that supports hybrid tracing in node js

  • 3.38.0
  • npm
  • Socket score

Version published
Weekly downloads
1.1M
increased by78.33%
Maintainers
1
Weekly downloads
 
Created

What is datadog-lambda-js?

The datadog-lambda-js npm package is designed to help you monitor and trace your AWS Lambda functions with Datadog. It provides tools to automatically collect and send metrics, logs, and traces from your Lambda functions to Datadog, enabling you to gain insights into the performance and behavior of your serverless applications.

What are datadog-lambda-js's main functionalities?

Automatic Tracing

This feature allows you to automatically trace your Lambda function executions. By wrapping your handler with the `datadog` function, you can send traces to Datadog without manually instrumenting your code.

const { datadog } = require('datadog-lambda-js');

const handler = datadog(async (event, context) => {
  // Your Lambda function code here
  return { statusCode: 200, body: 'Hello, world!' };
});

module.exports.handler = handler;

Custom Metrics

This feature allows you to send custom metrics from your Lambda functions to Datadog. You can use the `sendDistributionMetric` function to send metrics with specific values and tags.

const { sendDistributionMetric } = require('datadog-lambda-js');

const handler = async (event, context) => {
  // Your Lambda function code here
  sendDistributionMetric('my_custom_metric', 42, 'tag:value');
  return { statusCode: 200, body: 'Hello, world!' };
};

module.exports.handler = handler;

Log Forwarding

This feature enables you to forward logs from your Lambda functions to Datadog. By wrapping your handler with the `datadog` function, logs generated within your Lambda function will be automatically sent to Datadog.

const { datadog } = require('datadog-lambda-js');

const handler = datadog(async (event, context) => {
  console.log('This is a log message');
  return { statusCode: 200, body: 'Hello, world!' };
});

module.exports.handler = handler;

Other packages similar to datadog-lambda-js

FAQs

Package last updated on 12 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc