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

datadog-cdk-constructs-v2

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datadog-cdk-constructs-v2

CDK Construct Library to automatically instrument Python and Node Lambda functions with Datadog using AWS CDK v2

  • 1.19.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is datadog-cdk-constructs-v2?

The datadog-cdk-constructs-v2 npm package provides AWS CDK constructs for integrating Datadog monitoring and observability into your AWS infrastructure. It simplifies the process of setting up Datadog monitoring for AWS resources, including Lambda functions, ECS services, and more.

What are datadog-cdk-constructs-v2's main functionalities?

Datadog Lambda Monitoring

This feature allows you to monitor AWS Lambda functions with Datadog. The code sample demonstrates how to create a Lambda function and integrate it with Datadog for monitoring.

const { Datadog } = require('datadog-cdk-constructs-v2');
const { App, Stack } = require('aws-cdk-lib');
const { Function, Runtime, Code } = require('aws-cdk-lib/aws-lambda');

const app = new App();
const stack = new Stack(app, 'DatadogLambdaStack');

const lambdaFunction = new Function(stack, 'MyLambdaFunction', {
  runtime: Runtime.NODEJS_14_X,
  handler: 'index.handler',
  code: Code.fromAsset('lambda'),
});

new Datadog(stack, 'Datadog', {
  node: stack.node,
  lambdaFunctions: [lambdaFunction],
  apiKey: 'your-datadog-api-key',
  env: 'production',
});

app.synth();

Datadog ECS Monitoring

This feature allows you to monitor ECS services with Datadog. The code sample demonstrates how to create an ECS Fargate service and integrate it with Datadog for monitoring.

const { Datadog } = require('datadog-cdk-constructs-v2');
const { App, Stack } = require('aws-cdk-lib');
const { Cluster, FargateService, ContainerImage } = require('aws-cdk-lib/aws-ecs');

const app = new App();
const stack = new Stack(app, 'DatadogECSStack');

const cluster = new Cluster(stack, 'EcsCluster');
const fargateService = new FargateService(stack, 'FargateService', {
  cluster,
  taskDefinition: new TaskDefinition(stack, 'TaskDef', {
    compatibility: Compatibility.FARGATE,
    cpu: '256',
    memoryMiB: '512',
  }),
  desiredCount: 1,
  image: ContainerImage.fromRegistry('amazon/amazon-ecs-sample'),
});

new Datadog(stack, 'Datadog', {
  node: stack.node,
  ecsServices: [fargateService],
  apiKey: 'your-datadog-api-key',
  env: 'production',
});

app.synth();

Other packages similar to datadog-cdk-constructs-v2

Keywords

FAQs

Package last updated on 15 Nov 2024

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