ddcdkconstruct

package module
v2.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

README

Datadog CDK Constructs

NPM NPM PyPI PyPI Go License

Use this Datadog CDK Construct Library to deploy serverless applications using AWS CDK .

For more information on the DatadogECSFargate construct, see here.

This CDK library automatically configures ingestion of metrics, traces, and logs from your serverless applications by:

  • Installing and configuring the Datadog Lambda layers for your .NET, Java, Node.js, and Python Lambda functions.
  • Enabling the collection of traces and custom metrics from your Lambda functions.
  • Managing subscriptions from the Datadog Forwarder to your Lambda and non-Lambda log groups.

AWS CDK v1 vs AWS CDK v2

WARNING: AWS CDK v1 has reached end-of-support and datadog-cdk-constructs will no longer be receiving updates. It's strongly recommended to upgrade to AWS CDK v2 (official migration guide) and switch to using datadog-cdk-constructs-v2.

Two separate versions of Datadog CDK Constructs exist; datadog-cdk-constructs and datadog-cdk-constructs-v2. These are designed to work with AWS CDK v1 and AWS CDK v2 respectively.

  • datadog-cdk-constructs-v2 requires Node >= 14, while datadog-cdk-constructs supports Node >= 12.
  • datadog-cdk-constructs-v2 contains more features.
  • Otherwise, the use of the two packages is identical.

Lambda

Package Installation
npm

For use with AWS CDK v2:

yarn add --dev datadog-cdk-constructs-v2
# or
npm install datadog-cdk-constructs-v2 --save-dev

For use with AWS CDK v1:

yarn add --dev datadog-cdk-constructs
# or
npm install datadog-cdk-constructs --save-dev
PyPI

For use with AWS CDK v2:

pip install datadog-cdk-constructs-v2

For use with AWS CDK v1:

pip install datadog-cdk-constructs
Note:

Pay attention to the output from your package manager as the Datadog CDK Construct Library has peer dependencies.

Go

For use with AWS CDK v2:

go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2

AWS CDK v1 is not supported.

Usage
AWS CDK

The following examples assume the use of AWS CDK v2. If you're using CDK v1, import datadog-cdk-constructs rather than datadog-cdk-constructs-v2.

Add this to your CDK stack:

TypeScript
import { DatadogLambda } from "datadog-cdk-constructs-v2";

const datadogLambda = new DatadogLambda(this, "datadogLambda", {
  nodeLayerVersion: <LAYER_VERSION>,
  pythonLayerVersion: <LAYER_VERSION>,
  javaLayerVersion: <LAYER_VERSION>,
  dotnetLayerVersion: <LAYER_VERSION>
  addLayers: <BOOLEAN>,
  extensionLayerVersion: "<EXTENSION_VERSION>",
  forwarderArn: "<FORWARDER_ARN>",
  createForwarderPermissions: <BOOLEAN>,
  flushMetricsToLogs: <BOOLEAN>,
  site: "<SITE>",
  apiKey: "{Datadog_API_Key}",
  apiKeySecretArn: "{Secret_ARN_Datadog_API_Key}",
  apiKeySecret: <AWS_CDK_ISECRET>, // Only available in datadog-cdk-constructs-v2
  apiKmsKey: "{Encrypted_Datadog_API_Key}",
  enableDatadogTracing: <BOOLEAN>,
  enableMergeXrayTraces: <BOOLEAN>,
  enableDatadogLogs: <BOOLEAN>,
  injectLogContext: <BOOLEAN>,
  logLevel: <STRING>,
  env: <STRING>, //Optional
  service: <STRING>, //Optional
  version: <STRING>, //Optional
  tags: <STRING>, //Optional
});
datadogLambda.addLambdaFunctions([<LAMBDA_FUNCTIONS>])
datadogLambda.addForwarderToNonLambdaLogGroups([<LOG_GROUPS>])
Go
import (
	"github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
)
datadogLambda := ddcdkconstruct.NewDatadogLambda(
    stack,
    jsii.String("Datadog"),
    &ddcdkconstruct.DatadogLambdaProps{
        NodeLayerVersion:      jsii.Number(<LAYER_VERSION>),
        AddLayers:             jsii.Bool(<BOOLEAN>),
        Site:                  jsii.String(<SITE>),
        ApiKey:                jsii.String(os.Getenv("DD_API_KEY")),
        // ...
    })
datadogLambda.AddLambdaFunctions(&[]interface{}{myFunction}, nil)
datadogLambda.AddForwarderToNonLambdaLogGroups()
Source Code Integration

Source code integration is enabled by default through automatic lambda tagging, and will work if:

  • The Datadog Github integration is installed.

  • Your datadog-cdk dependency satisfies either of the below versions:

    • datadog-cdk-constructs-v2 >= 1.4.0
    • datadog-cdk-constructs >= 0.8.5
Alternative Methods to Enable Source Code Integration

If the automatic implementation doesn't work for your case, please follow one of the two guides below.

Note: these alternate guides only work for Typescript.

datadog-cdk version satisfied, but Datadog Github integration NOT installed

If the Datadog Github integration is not installed, you need to import the datadog-ci package and manually upload your Git metadata to Datadog. For the best results, import the datadog-ci package where your CDK Stack is initialized.

const app = new cdk.App();

// Make sure to add @datadog/datadog-ci via your package manager
const datadogCi = require("@datadog/datadog-ci");
// Manually uploading Git metadata to Datadog.
datadogCi.gitMetadata.uploadGitCommitHash("{Datadog_API_Key}", "<SITE>");

const app = new cdk.App();
new ExampleStack(app, "ExampleStack", {});

app.synth();
datadog-cdk version NOT satisfied

Change your initialization function as follows (in this case, gitHash value is passed to the CDK):

async function main() {
  // Make sure to add @datadog/datadog-ci via your package manager
  const datadogCi = require("@datadog/datadog-ci");
  const [, gitHash] = await datadogCi.gitMetadata.uploadGitCommitHash("{Datadog_API_Key}", "<SITE>");

  const app = new cdk.App();
  // Pass in the hash to the ExampleStack constructor
  new ExampleStack(app, "ExampleStack", {}, gitHash);
}

Ensure you call this function to initialize your stack.

In your stack constructor, change to add an optional gitHash parameter, and call addGitCommitMetadata():

export class ExampleStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps, gitHash?: string) {
    ...
    ...
    datadogLambda.addGitCommitMetadata([<YOUR_FUNCTIONS>], gitHash)
  }
}
Configuration

To further configure your DatadogLambda construct for Lambda, use the following custom parameters:

Note: The descriptions use the npm package parameters, but they also apply to PyPI and Go package parameters.

npm package parameter PyPI package parameter Description
addLayers add_layers Whether to add the runtime Lambda Layers or expect the user to bring their own. Defaults to true. When true, the Lambda Library version variables are also required. When false, you must include the Datadog Lambda library in your functions' deployment packages.
pythonLayerVersion python_layer_version Version of the Python Lambda layer to install, such as 83. Required if you are deploying at least one Lambda function written in Python and addLayers is true. Find the latest version number here. Warning: This parameter and pythonLayerArn are mutually exclusive. If used, only set one or the other.
pythonLayerArn python_layer_arn The custom ARN of the Python Lambda layer to install. Required if you are deploying at least one Lambda function written in Python and addLayers is true. Warning: This parameter and pythonLayerVersion are mutually exclusive. If used, only set one or the other.
nodeLayerVersion node_layer_version Version of the Node.js Lambda layer to install, such as 100. Required if you are deploying at least one Lambda function written in Node.js and addLayers is true. Find the latest version number from here. Warning: This parameter and nodeLayerArn are mutually exclusive. If used, only set one or the other.
nodeLayerArn node_layer_arn The custom ARN of the Node.js Lambda layer to install. Required if you are deploying at least one Lambda function written in Node.js and addLayers is true. Warning: This parameter and nodeLayerVersion are mutually exclusive. If used, only set one or the other.
javaLayerVersion java_layer_version Version of the Java layer to install, such as 8. Required if you are deploying at least one Lambda function written in Java and addLayers is true. Find the latest version number in the Serverless Java installation documentation. Note: extensionLayerVersion >= 25 and javaLayerVersion >= 5 are required for the DatadogLambda construct to instrument your Java functions properly. Warning: This parameter and javaLayerArn are mutually exclusive. If used, only set one or the other.
javaLayerArn java_layer_arn The custom ARN of the Java layer to install. Required if you are deploying at least one Lambda function written in Java and addLayers is true. Warning: This parameter and javaLayerVersion are mutually exclusive. If used, only set one or the other.
dotnetLayerVersion dotnet_layer_version Version of the .NET layer to install, such as 13. Required if you are deploying at least one Lambda function written in .NET and addLayers is true. Find the latest version number from here. Warning: This parameter and dotnetLayerArn are mutually exclusive. If used, only set one or the other.
dotnetLayerArn dotnet_layer_arn The custom ARN of the .NET layer to install. Required if you are deploying at least one Lambda function written in .NET and addLayers is true. Warning: This parameter and dotnetLayerVersion are mutually exclusive. If used, only set one or the other. .
extensionLayerVersion extension_layer_version Version of the Datadog Lambda Extension layer to install, such as 5. When extensionLayerVersion is set, apiKey (or if encrypted, apiKMSKey, apiKeySecret, or apiKeySecretArn) needs to be set as well. When enabled, lambda function log groups will not be subscribed by the forwarder. Learn more about the Lambda extension here. Warning: This parameter and extensionVersionArn are mutually exclusive. Set only one or the other. Note: If this parameter is set, it adds a layer even if addLayers is set to false.
extensionLayerArn extension_layer_arn The custom ARN of the Datadog Lambda Extension layer to install. When extensionLayerArn is set, apiKey (or if encrypted, apiKMSKey, apiKeySecret, or apiKeySecretArn) needs to be set as well. When enabled, lambda function log groups are not subscribed by the forwarder. Learn more about the Lambda extension here. Warning: This parameter andextensionLayerVersion are mutually exclusive. If used, only set one or the other. Note: If this parameter is set, it adds a layer even if addLayers is set to false.
forwarderArn forwarder_arn When set, the plugin automatically subscribes the Datadog Forwarder to the functions' log groups. Do not set forwarderArn when extensionLayerVersion or extensionLayerArn is set.
createForwarderPermissions createForwarderPermissions When set to true, creates a Lambda permission on the the Datadog Forwarder per log group. Since the Datadog Forwarder has permissions configured by default, this is unnecessary in most use cases.
flushMetricsToLogs flush_metrics_to_logs Send custom metrics using CloudWatch logs with the Datadog Forwarder Lambda function (recommended). Defaults to true . If you disable this parameter, it's required to set apiKey (or if encrypted, apiKMSKey, apiKeySecret, or apiKeySecretArn).
site site Set which Datadog site to send data. This is only used when flushMetricsToLogs is false or extensionLayerVersion or extensionLayerArn is set. Possible values are datadoghq.com, datadoghq.eu, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, and ddog-gov.com. The default is datadoghq.com.
apiKey api_key Datadog API Key, only needed when flushMetricsToLogs is false or extensionLayerVersion or extensionLayerArn is set. For more information about getting a Datadog API key, see the API key documentation.
apiKeySecretArn api_key_secret_arn The ARN of the secret storing the Datadog API key in AWS Secrets Manager. Use this parameter in place of apiKey when flushMetricsToLogs is false or extensionLayer is set. Remember to add the secretsmanager:GetSecretValue permission to the Lambda execution role.
apiKeySecret api_key_secret An AWS CDK ISecret representing a secret storing the Datadog API key in AWS Secrets Manager. Use this parameter in place of apiKeySecretArn to automatically grant your Lambda execution roles read access to the given secret. See here for an example. Only available in datadog-cdk-constructs-v2.
apiKmsKey api_kms_key Datadog API Key encrypted using KMS. Use this parameter in place of apiKey when flushMetricsToLogs is false or extensionLayerVersion or extensionLayerArn is set, and you are using KMS encryption.
enableDatadogTracing enable_datadog_tracing Enable Datadog tracing on your Lambda functions. Defaults to true.
enableMergeXrayTraces enable_merge_xray_traces Enable merging X-Ray traces on your Lambda functions. Defaults to false.
enableDatadogLogs enable_datadog_logs Send Lambda function logs to Datadog via the Datadog Lambda Extension. Defaults to true. Note: This setting has no effect on logs sent via the Datadog Forwarder.
enableDatadogASM enable_datadog_asm Enable Datadog Application Security Management (ASM) on the Lambda function. Requires the Datadog extension to be present (using extensionLayerVersion or extensionLayerArn) and enableDatadogTracing. Defaults to false.
captureLambdaPayload capture_lambda_payload Captures incoming and outgoing AWS Lambda payloads in the Datadog APM spans for Lambda invocations. Defaults to false.
captureCloudServicePayload capture_cloud_service_payload Capture requests and responses between your application and AWS services in the Datadog APM spans' tags. Supported services include SNS, SQS, Kinesis, S3, EventBridge, DynamoDB. If set to true, it will add DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING='all' and DD_TRACE_CLOUD_RESPONSE_PAYLOAD_TAGGING='all'. If set to false it would add DD_TRACE_CLOUD_REQUEST_PAYLOAD_TAGGING='$.*' and DD_TRACE_CLOUD_RESPONSE_PAYLOAD_TAGGING='$.*'. $.* is a JSONPath redaction rule that redacts all values. Defaults to false.
sourceCodeIntegration source_code_integration Enable Datadog Source Code Integration, connecting your telemetry with application code in your Git repositories. This requires the Datadog Github integration to work, otherwise please follow the alternative method. Learn more here. Defaults to true.
injectLogContext inject_log_context When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to true.
logLevel log_level When set to debug, the Datadog Lambda Library and Extension will log additional information to help troubleshoot issues.
env env When set along with extensionLayerVersion or extensionLayerArn, a DD_ENV environment variable is added to all Lambda functions with the provided value. When set along with forwarderArn, an env tag is added to all Lambda functions with the provided value.
service service When set along with extensionLayerVersion or extensionLayerArn, a DD_SERVICE environment variable is added to all Lambda functions with the provided value. When set along with forwarderArn, a service tag is added to all Lambda functions with the provided value.
version version When set along with extensionLayerVersion or extensionLayerArn, a DD_VERSION environment variable is added to all Lambda functions with the provided value. When set along with forwarderArn, a version tag is added to all Lambda functions with the provided value.
tags tags A comma separated list of key:value pairs as a single string. When set along with extensionLayerVersion or extensionLayerArn, a DD_TAGS environment variable is added to all Lambda functions with the provided value. When set along with forwarderArn, the cdk parses the string and sets each key:value pair as a tag to all Lambda functions.
enableColdStartTracing enable_cold_start_tracing Set to false to disable Cold Start Tracing. Used in Node.js and Python. Defaults to true.
coldStartTraceMinDuration min_cold_start_trace_duration Sets the minimum duration (in milliseconds) for a module load event to be traced via Cold Start Tracing. Number. Defaults to 3.
coldStartTraceSkipLibs cold_start_trace_skip_libs Optionally skip creating Cold Start Spans for a comma-separated list of libraries. Useful to limit depth or skip known libraries. Default depends on runtime.
enableProfiling enable_profiling Enable the Datadog Continuous Profiler with true. Supported in Beta for Node.js and Python. Defaults to false.
encodeAuthorizerContext encode_authorizer_context When set to true for Lambda authorizers, the tracing context will be encoded into the response for propagation. Supported for Node.js and Python. Defaults to true.
decodeAuthorizerContext decode_authorizer_context When set to true for Lambdas that are authorized via Lambda authorizers, it will parse and use the encoded tracing context (if found). Supported for Node.js and Python. Defaults to true.
apmFlushDeadline apm_flush_deadline Used to determine when to submit spans before a timeout occurs, in milliseconds. When the remaining time in an AWS Lambda invocation is less than the value set, the tracer attempts to submit the current active spans and all finished spans. Supported for Node.js and Python. Defaults to 100 milliseconds.
redirectHandler redirect_handler When set to false, skip redirecting handler to the Datadog Lambda Library's handler. Useful when only instrumenting with Datadog Lambda Extension. Defaults to true.
grantSecretReadAccess grant_secret_read_access When set to true and apiKeySecretArn is provided, automatically grant read access to the given secret to all the lambdas added. Defaults to true.
llmObsEnabled llm_obs_enabled Toggle to enable submitting data to LLM Observability Defaults to false.
llmObsMlApp llm_obs_ml_app The name of your LLM application, service, or project, under which all traces and spans are grouped. This helps distinguish between different applications or experiments. See Application naming guidelines for allowed characters and other constraints. To override this value for a given root span, see Tracing multiple applications. Required if llmObsEnabled is true
llmObsAgentlessEnabled llm_obs_agentless_enabled Only required if you are not using the Datadog Lambda Extension, in which case this should be set to true. Defaults to false.

Note: Using the parameters above may override corresponding function level DD_XXX environment variables.

Tracing

Enable X-Ray Tracing on your Lambda functions. For more information, see CDK documentation.

import * as lambda from "aws-cdk-lib/aws-lambda";

const lambda_function = new lambda.Function(this, "HelloHandler", {
  runtime: lambda.Runtime.NODEJS_18_X,
  code: lambda.Code.fromAsset("lambda"),
  handler: "hello.handler",
  tracing: lambda.Tracing.ACTIVE,
});
Nested Stacks

Add the Datadog CDK Construct to each stack you wish to instrument with Datadog. In the example below, we initialize the Datadog CDK Construct and call addLambdaFunctions() in both the RootStack and NestedStack.

import { DatadogLambda } from "datadog-cdk-constructs-v2";
import * as cdk from "aws-cdk-lib";
import { Construct } from "constructs";

class RootStack extends cdk.Stack {
  constructor(scope: cdk.App, id: string, props?: cdk.StackProps) {
    super(scope, id, props);
    new NestedStack(this, "NestedStack");

    const datadogLambda = new DatadogLambda(this, "DatadogLambda", {
      nodeLayerVersion: <LAYER_VERSION>,
      pythonLayerVersion: <LAYER_VERSION>,
      javaLayerVersion: <LAYER_VERSION>,
      dotnetLayerVersion: <LAYER-VERSION>,
      addLayers: <BOOLEAN>,
      forwarderArn: "<FORWARDER_ARN>",
      flushMetricsToLogs: <BOOLEAN>,
      site: "<SITE>",
      apiKey: "{Datadog_API_Key}",
      apiKeySecretArn: "{Secret_ARN_Datadog_API_Key}",
      apiKmsKey: "{Encrypted_Datadog_API_Key}",
      enableDatadogTracing: <BOOLEAN>,
      enableMergeXrayTraces: <BOOLEAN>,
      enableDatadogLogs: <BOOLEAN>,
      injectLogContext: <BOOLEAN>
    });
    datadogLambda.addLambdaFunctions([<LAMBDA_FUNCTIONS>]);

  }
}

class NestedStack extends cdk.NestedStack {
  constructor(scope: Construct, id: string, props?: cdk.NestedStackProps) {
    super(scope, id, props);

    const datadogLambda = new DatadogLambda(this, "DatadogLambda", {
      nodeLayerVersion: <LAYER_VERSION>,
      pythonLayerVersion: <LAYER_VERSION>,
      javaLayerVersion: <LAYER_VERSION>,
      dotnetLayerVersion: <LAYER-VERSION>,
      addLayers: <BOOLEAN>,
      forwarderArn: "<FORWARDER_ARN>",
      flushMetricsToLogs: <BOOLEAN>,
      site: "<SITE>",
      apiKey: "{Datadog_API_Key}",
      apiKeySecretArn: "{Secret_ARN_Datadog_API_Key}",
      apiKmsKey: "{Encrypted_Datadog_API_Key}",
      enableDatadogTracing: <BOOLEAN>,
      enableMergeXrayTraces: <BOOLEAN>,
      enableDatadogLogs: <BOOLEAN>,
      injectLogContext: <BOOLEAN>
    });
    datadogLambda.addLambdaFunctions([<LAMBDA_FUNCTIONS>]);

  }
}
Tags

Add tags to your constructs. We recommend setting an env and service tag to tie Datadog telemetry together. For more information see official AWS documentation and CDK documentation.

Automatically grant AWS secret read access to Lambda execution role

Only available in datadog-cdk-constructs-v2

To automatically grant your Lambda execution roles read access to a given secret, pass in apiKeySecret in place of apiKeySecretArn when initializing the DatadogLambda construct.

const { Secret } = require('aws-cdk-lib/aws-secretsmanager');

const secret = Secret.fromSecretPartialArn(this, 'DatadogApiKeySecret', 'arn:aws:secretsmanager:us-west-1:123:secret:DATADOG_API_KEY');

const datadogLambda = new DatadogLambda(this, 'DatadogLambda', {
  ...
  apiKeySecret: secret
  ...
});

When addLambdaFunctions is called, the Datadog CDK construct grants your Lambda execution roles read access to the given AWS secret. This is done through the AWS ISecret's grantRead function.

How it works

The DatadogLambda construct takes in a list of lambda functions and installs the Datadog Lambda Library by attaching the Lambda Layers for .NET, Java, Node.js, and Python to your functions. It redirects to a replacement handler that initializes the Lambda Library without any required code changes. Additional configurations added to the Datadog CDK construct will also translate into their respective environment variables under each lambda function (if applicable / required).

While Lambda function based log groups are handled by the addLambdaFunctions method automatically, the construct has an additional function addForwarderToNonLambdaLogGroups which subscribes the forwarder to any additional log groups of your choosing.

Step Functions

Only AWS CDK v2 is supported.

Usage
TypeScript

Example stack: step-functions-typescript-stack

Basic setup
import * as sfn from "aws-cdk-lib/aws-stepfunctions";
import { DatadogStepFunctions} from "datadog-cdk-constructs-v2";

const stateMachine = new sfn.StateMachine(...);
const datadogSfn = new DatadogStepFunctions(this, "DatadogSfn", {
  env: "<ENV>", // e.g. "dev"
  service: "<SERVICE>", // e.g. "my-cdk-service"
  version: "<VERSION>", // e.g. "1.0.0"
  forwarderArn: "<FORWARDER_ARN>", // e.g. "arn:test:forwarder:sa-east-1:12345678:1"
  tags: <TAGS>, // optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2"
});
datadogSfn.addStateMachines([stateMachine]);
Merging traces

To merge the Step Function's traces with downstream Lambda function or Step function's traces, modify the Lambda task payload or Step Function task input:

import * as tasks from "aws-cdk-lib/aws-stepfunctions-tasks";
import * as sfn from "aws-cdk-lib/aws-stepfunctions";
import { DatadogStepFunctions, DatadogLambda } from "datadog-cdk-constructs-v2";

const lambdaFunction = ...;
const lambdaTask = new tasks.LambdaInvoke(this, "MyLambdaTask", {
  lambdaFunction: lambdaFunction,
  payload: sfn.TaskInput.fromObject(
    DatadogStepFunctions.buildLambdaPayloadToMergeTraces(
      { "custom-key": "custom-value" }
    )
  ),
});

const childStateMachine = new sfn.StateMachine(...);
const invokeChildStateMachineTask = new tasks.StepFunctionsStartExecution(this, "InvokeChildStateMachineTask", {
  stateMachine: childStateMachine,
  input: sfn.TaskInput.fromObject(
    DatadogStepFunctions.buildStepFunctionTaskInputToMergeTraces({ "custom-key": "custom-value" }),
  ),
});

const stateMachine = new sfn.StateMachine(this, "CdkTypeScriptTestStateMachine", {
  definitionBody: sfn.DefinitionBody.fromChainable(lambdaTask.next(invokeChildStateMachineTask)),
});

const datadogLambda = ...;
datadogLambda.addLambdaFunctions([lambdaFunction]);

const datadogSfn = ...;
datadogSfn.addStateMachines([childStateMachine, stateMachine]);
Python

Example stack: step-functions-python-stack

Basic setup
from aws_cdk import (
    aws_stepfunctions as sfn,
    aws_stepfunctions_tasks as tasks,
)
from datadog_cdk_constructs_v2 import DatadogStepFunctions, DatadogLambda

state_machine = sfn.StateMachine(...)
datadog_sfn = DatadogStepFunctions(
    self,
    "DatadogSfn",
    env="<ENV>", # e.g. "dev"
    service="<SERVICE>", # e.g. "my-cdk-service"
    version="<VERSION>", # e.g. "1.0.0"
    forwarderArn="<FORWARDER_ARN>", # e.g. "arn:test:forwarder:sa-east-1:12345678:1"
    tags=<TAGS>, # optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2"
)
datadog_sfn.add_state_machines([child_state_machine, parent_state_machine])
Merging traces

To merge the Step Function's traces with downstream Lambda function or Step function's traces, modify the Lambda task payload or Step Function task input:

from aws_cdk import (
    aws_lambda,
    aws_stepfunctions as sfn,
    aws_stepfunctions_tasks as tasks,
)
from datadog_cdk_constructs_v2 import DatadogStepFunctions, DatadogLambda

lambda_function = aws_lambda.Function(...)
lambda_task = tasks.LambdaInvoke(
    self,
    "MyLambdaTask",
    lambda_function=lambda_function,
    payload=sfn.TaskInput.from_object(
        DatadogStepFunctions.build_lambda_payload_to_merge_traces(
            {"custom-key": "custom-value"}
        )
    ),
)

child_state_machine = sfn.StateMachine(...)
invoke_child_state_machine_task = tasks.StepFunctionsStartExecution(
    self,
    "InvokeChildStateMachineTask",
    state_machine=child_state_machine,
    input=sfn.TaskInput.from_object(
        DatadogStepFunctions.build_step_function_task_input_to_merge_traces(
            {"custom-key": "custom-value"}
        )
    ),
)

state_machine = sfn.StateMachine(
    self,
    "CdkPythonTestStateMachine",
    definition_body=sfn.DefinitionBody.from_chainable(
        lambda_task.next(invoke_child_state_machine_task)
    ),
)

datadog_lambda = DatadogLambda(...)
datadog_lambda.add_lambda_functions([lambda_function])

datadog_sfn = DatadogStepFunctions(...)
datadog_sfn.add_state_machines([child_state_machine, state_machine])
Go

Example stack: step-functions-go-stack

Basic setup
import (
	"github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
	"github.com/aws/aws-cdk-go/awscdk/v2"
	sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
)

stack := awscdk.NewStack(...)
stateMachine := sfn.NewStateMachine(...)
datadogSfn := ddcdkconstruct.NewDatadogStepFunctions(
  stack,
  jsii.String("DatadogSfn"),
  &ddcdkconstruct.DatadogStepFunctionsProps{
    Env:            jsii.String("<ENV>"), // e.g. "dev"
    Service:        jsii.String("<SERVICE>), // e.g. "my-cdk-service"
    Version:        jsii.String("<VERSION>"), // e.g. "1.0.0"
    ForwarderArn:   jsii.String("<FORWARDER_ARN>"), // e.g. "arn:test:forwarder:sa-east-1:12345678:1"
    Tags:           jsii.String("<TAGS>"), // optional, e.g. "custom-tag-1:tag-value-1,custom-tag-2:tag-value-2"
  }
)
datadogSfn.AddStateMachines(&[]sfn.StateMachine{stateMachine}, nil)
Merging traces

To merge the Step Function's traces with downstream Lambda function or Step function's traces, modify the Lambda task payload or Step Function task input:

import (
	"github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
	"github.com/aws/aws-cdk-go/awscdk/v2/awslambda"
	sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
	sfntasks "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks"
	"github.com/aws/jsii-runtime-go"
)

lambdaFunction := awslambda.NewFunction(...)
lambdaPayload := ddcdkconstruct.DatadogStepFunctions_BuildLambdaPayloadToMergeTraces(&map[string]interface{}{
  "custom-key": "custom-value",
})
lambdaTask := sfntasks.NewLambdaInvoke(stack, jsii.String("MyLambdaTask"), &sfntasks.LambdaInvokeProps{
  LambdaFunction: lambdaFunction,
  Payload: sfn.TaskInput_FromObject(lambdaPayload),
})

childStateMachine := sfn.NewStateMachine(...)
stateMachineTaskInput := ddcdkconstruct.DatadogStepFunctions_BuildStepFunctionTaskInputToMergeTraces(
  &map[string]interface{}{
    "custom-key": "custom-value",
  }
)
invokeChildStateMachineTask := sfntasks.NewStepFunctionsStartExecution(
  stack,
  jsii.String("InvokeChildStateMachineTask"),
  &sfntasks.StepFunctionsStartExecutionProps{
    StateMachine: childStateMachine,
    Input: sfn.TaskInput_FromObject(stateMachineTaskInput),
  }
)
stateMachine := sfn.NewStateMachine(stack, jsii.String("CdkGoTestStateMachine"), &sfn.StateMachineProps{
  DefinitionBody: sfn.DefinitionBody_FromChainable(lambdaTask.Next(invokeChildStateMachineTask)),
})

datadogLambda := ...
datadogLambda.AddLambdaFunctions(&[]interface{}{lambdaFunction}, nil)

datadogSfn := ...
datadogSfn.AddStateMachines(&[]sfn.StateMachine{childStateMachine, stateMachine}, nil)
Configuration

Parameters for creating the DatadogStepFunctions construct:

npm package parameter PyPI package parameter Go package parameter Description
env env Env The env tag to be added to the state machine.
service service Service The service tag to be added to the state machine.
version version Version The version tag to be added to the state machine.
forwarderArn forwarder_arn ForwarderArn ARN or Datadog Forwarder, which will subscribe to the state machine's log group.
tags tags Tags A comma separated list of key:value pairs as a single string, which will be added to the state machine's tags.
How it works

The DatadogStepFunctions construct takes in a list of state machines and for each of them:

  1. Set up logging, including:

    1. Set log level to ALL
    2. Set includeExecutionData to true
    3. Create and set destination log group (if not set already)
    4. Add permissions to the state machine role to log to CloudWatch Logs
  2. Subscribe Datadog Forwarder to the state machine's log group

  3. Set tags, including:

    1. env

    2. service

    3. version

    4. DD_TRACE_ENABLED: true. This enables tracing.

      1. To disable tracing, set it to false from AWS Management Console after the stack is deployed.
      2. If you wish to disable tracing using CDK, please open an issue so we can support it.
    5. dd_cdk_construct version tag

    6. custom tags passed as the tags paramater to DatadogStepFunctions construct

To merge the Step Function's traces with downstream Lambda function or Step function's traces, the construct adds $$.Execution, $$.State and $$.StateMachine fields into the Step Function task input or Lambda task payload.

Troubleshooting
Log group already exists

If cdk deploy fails with an error like:

Resource of type 'AWS::Logs::LogGroup' with identifier '{"/properties/LogGroupName":"/aws/vendedlogs/states/CdkStepFunctionsTypeScriptStack1-CdkTypeScriptTestChildStateMachine-Logs-dev"}' already exists.

You have two options:

  1. Delete the log group if you no longer need the logs in it. You may do so from AWS Management Console, at CloudWatch -> Logs -> Log groups.
  2. Update the state machine definition if you wish to use the existing log group:
import * as logs from 'aws-cdk-lib/aws-logs';

const logGroupName = "/aws/vendedlogs/states/xxx";
const logGroup = logs.LogGroup.fromLogGroupName(stack, 'StateMachineLogGroup', logGroupName);

const stateMachine = new sfn.StateMachine(stack, 'MyStateMachine', {
  logs: {
    destination: logGroup,
  },
  ...
});

Resources to learn about CDK

Using Projen

The Datadog CDK Construct Libraries use Projen to maintain project configuration files such as the package.json, .gitignore, .npmignore, etc. Most of the configuration files will be protected by Projen via read-only permissions. In order to change these files, edit the .projenrc.js file, then run npx projen to synthesize the new changes. Check out Projen for more details.

Migrating from v2-1.x.x to v2-2.x.x

In February 2025, Datadog released a major version update from 1.x.x to 2.x.x. The required changes to migrate to the new version are as follows:

  1. Rename the classes for instrumenting Lambda functions:

    1. Datadog -> DatadogLambda
    2. DatadogProps -> DatadogLambdaProps For examples, see the Usage section of this page and examples/ folder of the GitHub repository.
  2. Upgrade Node.js version to 18.18.0 or above.

  3. For Go, change the import from:

    "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
    

    to:

    "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
    

Opening Issues

If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates.

When opening an issue, include the Datadog CDK Construct version, Node version, and stack trace if available. In addition, include the steps to reproduce when appropriate.

You can also open an issue for a feature request.

Contributing

If you find an issue with this package and have a fix, please feel free to open a pull request following the procedures.

Testing

If you contribute to this package you can run the tests using yarn test. This package also includes a sample application for manual testing:

  1. Open a seperate terminal.
  2. Run yarn watch, this will ensure the Typescript files in the src directory are compiled to Javascript in the lib directory.
  3. Navigate to src/sample, here you can edit index.ts to test your contributions manually.
  4. At the root directory, run npx cdk --app lib/sample/index.js <CDK Command>, replacing <CDK Command> with common CDK commands like synth, diff, or deploy.
  • Note, if you receive "... is not authorized to perform: ..." you may also need to authorize the commands with your AWS credentials.
Debug Logs

To display the debug logs for this library for Lambda, set the DD_CONSTRUCT_DEBUG_LOGS env var to true when running cdk synth (use --quiet to suppress generated template output).

Example: Ensure you are at the root directory

DD_CONSTRUCT_DEBUG_LOGS=true npx cdk --app lib/sample/index.js synth --quiet

Community

For product feedback and questions, join the #serverless channel in the Datadog community on Slack.

License

Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.

This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatadogECSFargateTaskDefinition_FromFargateTaskDefinitionArn added in v2.3.0

func DatadogECSFargateTaskDefinition_FromFargateTaskDefinitionArn(scope constructs.Construct, id *string, fargateTaskDefinitionArn *string) awsecs.IFargateTaskDefinition

Imports a task definition from the specified task definition ARN.

func DatadogECSFargateTaskDefinition_FromFargateTaskDefinitionAttributes added in v2.3.0

func DatadogECSFargateTaskDefinition_FromFargateTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *awsecs.FargateTaskDefinitionAttributes) awsecs.IFargateTaskDefinition

Import an existing Fargate task definition from its attributes.

func DatadogECSFargateTaskDefinition_FromTaskDefinitionArn added in v2.3.0

func DatadogECSFargateTaskDefinition_FromTaskDefinitionArn(scope constructs.Construct, id *string, taskDefinitionArn *string) awsecs.ITaskDefinition

Imports a task definition from the specified task definition ARN.

The task will have a compatibility of EC2+Fargate.

func DatadogECSFargateTaskDefinition_FromTaskDefinitionAttributes added in v2.3.0

func DatadogECSFargateTaskDefinition_FromTaskDefinitionAttributes(scope constructs.Construct, id *string, attrs *awsecs.TaskDefinitionAttributes) awsecs.ITaskDefinition

Create a task definition from a task definition reference.

func DatadogECSFargateTaskDefinition_IsConstruct added in v2.3.0

func DatadogECSFargateTaskDefinition_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func DatadogECSFargateTaskDefinition_IsOwnedResource added in v2.3.0

func DatadogECSFargateTaskDefinition_IsOwnedResource(construct constructs.IConstruct) *bool

Returns true if the construct was created by CDK, and false otherwise.

func DatadogECSFargateTaskDefinition_IsResource added in v2.3.0

func DatadogECSFargateTaskDefinition_IsResource(construct constructs.IConstruct) *bool

Check whether the given construct is a Resource.

func DatadogLambda_IsConstruct

func DatadogLambda_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func DatadogStepFunctions_BuildLambdaPayloadToMergeTraces

func DatadogStepFunctions_BuildLambdaPayloadToMergeTraces(payload *map[string]interface{}) *map[string]interface{}

func DatadogStepFunctions_BuildStepFunctionTaskInputToMergeTraces

func DatadogStepFunctions_BuildStepFunctionTaskInputToMergeTraces(input *map[string]interface{}) *map[string]interface{}

func DatadogStepFunctions_IsConstruct

func DatadogStepFunctions_IsConstruct(x interface{}) *bool

Checks if `x` is a construct.

Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: use `x instanceof Construct` instead.

func NewDatadogECSFargateTaskDefinition_Override added in v2.3.0

func NewDatadogECSFargateTaskDefinition_Override(d DatadogECSFargateTaskDefinition, scope constructs.Construct, id *string, props *awsecs.FargateTaskDefinitionProps, datadogProps *DatadogECSFargateProps)

func NewDatadogECSFargate_Override added in v2.3.0

func NewDatadogECSFargate_Override(d DatadogECSFargate, datadogProps *DatadogECSFargateProps)

func NewDatadogLambda_Override

func NewDatadogLambda_Override(d DatadogLambda, scope constructs.Construct, id *string, props *DatadogLambdaProps)

func NewDatadogStepFunctions_Override

func NewDatadogStepFunctions_Override(d DatadogStepFunctions, scope constructs.Construct, id *string, props *DatadogStepFunctionsProps)

func NewTransport_Override

func NewTransport_Override(t Transport, flushMetricsToLogs *bool, site *string, apiKey *string, apiKeySecretArn *string, apiKmsKey *string, extensionLayerVersion *float64, extensionLayerArn *string)

Types

type APMFeatureConfig added in v2.3.0

type APMFeatureConfig struct {
	// Enables APM.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
	// Enables Profile collection.
	//
	// Requires Datadog APM SSI instrumentation on your application containers.
	IsProfilingEnabled *bool `field:"optional" json:"isProfilingEnabled" yaml:"isProfilingEnabled"`
	// Enables APM traces traffic over Unix Domain Socket.
	//
	// Falls back to TCP configuration for application containers when disabled.
	IsSocketEnabled *bool `field:"optional" json:"isSocketEnabled" yaml:"isSocketEnabled"`
	// Enables inferred spans for proxy services like AWS API Gateway.
	//
	// When enabled, the tracer will create spans for proxy services by using headers
	// passed from the proxy service to the application.
	TraceInferredProxyServices *bool `field:"optional" json:"traceInferredProxyServices" yaml:"traceInferredProxyServices"`
}

APM feature configuration.

type CWSFeatureConfig added in v2.3.0

type CWSFeatureConfig struct {
	// Enables CWS.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
}

CWS feature configuration.

type Cardinality added in v2.3.0

type Cardinality string

Cardinality of metrics.

const (
	Cardinality_LOW          Cardinality = "LOW"
	Cardinality_ORCHESTRATOR Cardinality = "ORCHESTRATOR"
	Cardinality_HIGH         Cardinality = "HIGH"
)

type DatadogECSBaseProps added in v2.3.0

type DatadogECSBaseProps struct {
	// The Datadog API key string.
	//
	// Must define at least 1 source for the API key.
	ApiKey *string `field:"optional" json:"apiKey" yaml:"apiKey"`
	// The Datadog API key secret.
	//
	// Must define at least 1 source for the API key.
	ApiKeySecret awssecretsmanager.ISecret `field:"optional" json:"apiKeySecret" yaml:"apiKeySecret"`
	// The ARN of the Datadog API key secret.
	//
	// Must define at least 1 source for the API key.
	ApiKeySecretArn *string `field:"optional" json:"apiKeySecretArn" yaml:"apiKeySecretArn"`
	// APM feature configuration.
	Apm *APMFeatureConfig `field:"optional" json:"apm" yaml:"apm"`
	// The Datadog Agent checks tag cardinality.
	ChecksCardinality Cardinality `field:"optional" json:"checksCardinality" yaml:"checksCardinality"`
	// The cluster name to use for tagging.
	ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"`
	// The minimum number of CPU units to reserve for the Datadog Agent container.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Configure health check for the Datadog Agent container.
	DatadogHealthCheck *awsecs.HealthCheck `field:"optional" json:"datadogHealthCheck" yaml:"datadogHealthCheck"`
	// DogStatsD feature configuration.
	Dogstatsd *DogstatsdFeatureConfig `field:"optional" json:"dogstatsd" yaml:"dogstatsd"`
	// The task environment name.
	//
	// Used for tagging (UST).
	Env *string `field:"optional" json:"env" yaml:"env"`
	// Datadog Agent environment variables.
	EnvironmentVariables *map[string]*string `field:"optional" json:"environmentVariables" yaml:"environmentVariables"`
	// Global tags to apply to all data sent by the Agent.
	//
	// Overrides any DD_TAGS values in environmentVariables.
	GlobalTags *string `field:"optional" json:"globalTags" yaml:"globalTags"`
	// The version of the Datadog Agent container image to use.
	ImageVersion *string `field:"optional" json:"imageVersion" yaml:"imageVersion"`
	// Configure added containers to have container dependency on the Datadog Agent container.
	IsDatadogDependencyEnabled *bool `field:"optional" json:"isDatadogDependencyEnabled" yaml:"isDatadogDependencyEnabled"`
	// Configure Datadog Agent container to be essential for the task.
	IsDatadogEssential *bool `field:"optional" json:"isDatadogEssential" yaml:"isDatadogEssential"`
	// The amount (in MiB) of memory to present to the Datadog Agent container.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The registry to pull the Datadog Agent container image from.
	Registry *string `field:"optional" json:"registry" yaml:"registry"`
	// The task service name.
	//
	// Used for tagging (UST).
	Service *string `field:"optional" json:"service" yaml:"service"`
	// The Datadog site to send data to.
	Site *string `field:"optional" json:"site" yaml:"site"`
	// The task version.
	//
	// Used for tagging (UST).
	Version *string `field:"optional" json:"version" yaml:"version"`
}

type DatadogECSFargate added in v2.3.0

type DatadogECSFargate interface {
	// Creates a new Fargate Task Definition instrumented with Datadog.
	//
	// Merges the provided task's datadogProps with the class's datadogProps.
	FargateTaskDefinition(scope constructs.Construct, id *string, props *awsecs.FargateTaskDefinitionProps, datadogProps *DatadogECSFargateProps) DatadogECSFargateTaskDefinition
}

The Datadog ECS Fargate construct manages the Datadog configuration for ECS Fargate tasks.

func NewDatadogECSFargate added in v2.3.0

func NewDatadogECSFargate(datadogProps *DatadogECSFargateProps) DatadogECSFargate

type DatadogECSFargateProps added in v2.3.0

type DatadogECSFargateProps struct {
	// The Datadog API key string.
	//
	// Must define at least 1 source for the API key.
	ApiKey *string `field:"optional" json:"apiKey" yaml:"apiKey"`
	// The Datadog API key secret.
	//
	// Must define at least 1 source for the API key.
	ApiKeySecret awssecretsmanager.ISecret `field:"optional" json:"apiKeySecret" yaml:"apiKeySecret"`
	// The ARN of the Datadog API key secret.
	//
	// Must define at least 1 source for the API key.
	ApiKeySecretArn *string `field:"optional" json:"apiKeySecretArn" yaml:"apiKeySecretArn"`
	// APM feature configuration.
	Apm *APMFeatureConfig `field:"optional" json:"apm" yaml:"apm"`
	// The Datadog Agent checks tag cardinality.
	ChecksCardinality Cardinality `field:"optional" json:"checksCardinality" yaml:"checksCardinality"`
	// The cluster name to use for tagging.
	ClusterName *string `field:"optional" json:"clusterName" yaml:"clusterName"`
	// The minimum number of CPU units to reserve for the Datadog Agent container.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Configure health check for the Datadog Agent container.
	DatadogHealthCheck *awsecs.HealthCheck `field:"optional" json:"datadogHealthCheck" yaml:"datadogHealthCheck"`
	// DogStatsD feature configuration.
	Dogstatsd *DogstatsdFeatureConfig `field:"optional" json:"dogstatsd" yaml:"dogstatsd"`
	// The task environment name.
	//
	// Used for tagging (UST).
	Env *string `field:"optional" json:"env" yaml:"env"`
	// Datadog Agent environment variables.
	EnvironmentVariables *map[string]*string `field:"optional" json:"environmentVariables" yaml:"environmentVariables"`
	// Global tags to apply to all data sent by the Agent.
	//
	// Overrides any DD_TAGS values in environmentVariables.
	GlobalTags *string `field:"optional" json:"globalTags" yaml:"globalTags"`
	// The version of the Datadog Agent container image to use.
	ImageVersion *string `field:"optional" json:"imageVersion" yaml:"imageVersion"`
	// Configure added containers to have container dependency on the Datadog Agent container.
	IsDatadogDependencyEnabled *bool `field:"optional" json:"isDatadogDependencyEnabled" yaml:"isDatadogDependencyEnabled"`
	// Configure Datadog Agent container to be essential for the task.
	IsDatadogEssential *bool `field:"optional" json:"isDatadogEssential" yaml:"isDatadogEssential"`
	// The amount (in MiB) of memory to present to the Datadog Agent container.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The registry to pull the Datadog Agent container image from.
	Registry *string `field:"optional" json:"registry" yaml:"registry"`
	// The task service name.
	//
	// Used for tagging (UST).
	Service *string `field:"optional" json:"service" yaml:"service"`
	// The Datadog site to send data to.
	Site *string `field:"optional" json:"site" yaml:"site"`
	// The task version.
	//
	// Used for tagging (UST).
	Version       *string                            `field:"optional" json:"version" yaml:"version"`
	Cws           *FargateCWSFeatureConfig           `field:"optional" json:"cws" yaml:"cws"`
	LogCollection *FargateLogCollectionFeatureConfig `field:"optional" json:"logCollection" yaml:"logCollection"`
}

type DatadogECSFargateTaskDefinition added in v2.3.0

type DatadogECSFargateTaskDefinition interface {
	awsecs.FargateTaskDefinition
	// The task launch type compatibility requirement.
	Compatibility() awsecs.Compatibility
	// The container definitions.
	Containers() *[]awsecs.ContainerDefinition
	CwsContainer() awsecs.ContainerDefinition
	DatadogContainer() awsecs.ContainerDefinition
	// Default container for this task.
	//
	// Load balancers will send traffic to this container. The first
	// essential container that is added to this task will become the default
	// container.
	DefaultContainer() awsecs.ContainerDefinition
	SetDefaultContainer(val awsecs.ContainerDefinition)
	// The environment this resource belongs to.
	//
	// For resources that are created and managed by the CDK
	// (generally, those created by creating new class instances like Role, Bucket, etc.),
	// this is always the same as the environment of the stack they belong to;
	// however, for imported resources
	// (those obtained from static methods like fromRoleArn, fromBucketName, etc.),
	// that might be different than the stack they were imported into.
	Env() *awscdk.ResourceEnvironment
	// The amount (in GiB) of ephemeral storage to be allocated to the task.
	EphemeralStorageGiB() *float64
	// Execution role for this task definition.
	ExecutionRole() awsiam.IRole
	// The name of a family that this task definition is registered to.
	//
	// A family groups multiple versions of a task definition.
	Family() *string
	// Public getter method to access list of inference accelerators attached to the instance.
	InferenceAccelerators() *[]*awsecs.InferenceAccelerator
	// Return true if the task definition can be run on an EC2 cluster.
	IsEc2Compatible() *bool
	// Return true if the task definition can be run on a ECS anywhere cluster.
	IsExternalCompatible() *bool
	// Return true if the task definition can be run on a Fargate cluster.
	IsFargateCompatible() *bool
	LogContainer() awsecs.ContainerDefinition
	// The Docker networking mode to use for the containers in the task.
	//
	// Fargate tasks require the awsvpc network mode.
	NetworkMode() awsecs.NetworkMode
	// The tree node.
	Node() constructs.Node
	// Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
	//
	// This value will resolve to one of the following:
	// - a concrete value (e.g. `"my-awesome-bucket"`)
	// - `undefined`, when a name should be generated by CloudFormation
	// - a concrete name generated automatically during synthesis, in
	//   cross-environment scenarios.
	PhysicalName() *string
	// The process namespace to use for the containers in the task.
	//
	// Only supported for tasks that are hosted on AWS Fargate if the tasks
	// are using platform version 1.4.0 or later (Linux). Not supported in
	// Windows containers. If pidMode is specified for a Fargate task,
	// then runtimePlatform.operatingSystemFamily must also be specified.  For more
	// information, see [Task Definition Parameters](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_pidmode).
	PidMode() awsecs.PidMode
	// Whether this task definition has at least a container that references a specific JSON field of a secret stored in Secrets Manager.
	ReferencesSecretJsonField() *bool
	// The stack in which this resource is defined.
	Stack() awscdk.Stack
	// The full Amazon Resource Name (ARN) of the task definition.
	TaskDefinitionArn() *string
	// The name of the IAM role that grants containers in the task permission to call AWS APIs on your behalf.
	TaskRole() awsiam.IRole
	// Adds a new container to the task definition.
	//
	// Modifies properties of container to support specified agent configuration in task.
	AddContainer(id *string, containerProps *awsecs.ContainerDefinitionOptions) awsecs.ContainerDefinition
	// Adds the specified extension to the task definition.
	//
	// Extension can be used to apply a packaged modification to
	// a task definition.
	AddExtension(extension awsecs.ITaskDefinitionExtension)
	// Adds a firelens log router to the task definition.
	AddFirelensLogRouter(id *string, props *awsecs.FirelensLogRouterDefinitionOptions) awsecs.FirelensLogRouter
	// Adds an inference accelerator to the task definition.
	AddInferenceAccelerator(inferenceAccelerator *awsecs.InferenceAccelerator)
	// Adds the specified placement constraint to the task definition.
	AddPlacementConstraint(constraint awsecs.PlacementConstraint)
	// Adds a policy statement to the task execution IAM role.
	AddToExecutionRolePolicy(statement awsiam.PolicyStatement)
	// Adds a policy statement to the task IAM role.
	AddToTaskRolePolicy(statement awsiam.PolicyStatement)
	// Adds a volume to the task definition.
	AddVolume(volume *awsecs.Volume)
	// Apply the given removal policy to this resource.
	//
	// The Removal Policy controls what happens to this resource when it stops
	// being managed by CloudFormation, either because you've removed it from the
	// CDK application or because you've made a change that requires the resource
	// to be replaced.
	//
	// The resource can be deleted (`RemovalPolicy.DESTROY`), or left in your AWS
	// account for data recovery and cleanup later (`RemovalPolicy.RETAIN`).
	ApplyRemovalPolicy(policy awscdk.RemovalPolicy)
	// Returns the container that match the provided containerName.
	FindContainer(containerName *string) awsecs.ContainerDefinition
	// Determine the existing port mapping for the provided name.
	//
	// Returns: PortMapping for the provided name, if it exists.
	FindPortMappingByName(name *string) *awsecs.PortMapping
	GeneratePhysicalName() *string
	// Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. `bucket.bucketArn`).
	//
	// Normally, this token will resolve to `arnAttr`, but if the resource is
	// referenced across environments, `arnComponents` will be used to synthesize
	// a concrete ARN with the resource's physical name. Make sure to reference
	// `this.physicalName` in `arnComponents`.
	GetResourceArnAttribute(arnAttr *string, arnComponents *awscdk.ArnComponents) *string
	// Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. `bucket.bucketName`).
	//
	// Normally, this token will resolve to `nameAttr`, but if the resource is
	// referenced across environments, it will be resolved to `this.physicalName`,
	// which will be a concrete name.
	GetResourceNameAttribute(nameAttr *string) *string
	// Grants permissions to run this task definition.
	//
	// This will grant the following permissions:
	//
	//   - ecs:RunTask
	// - iam:PassRole.
	GrantRun(grantee awsiam.IGrantable) awsiam.Grant
	// Creates the task execution IAM role if it doesn't already exist.
	ObtainExecutionRole() awsiam.IRole
	// Returns a string representation of this construct.
	ToString() *string
}

The Datadog ECS Fargate Task Definition automatically instruments the ECS Fargate task and containers with configured Datadog features.

func NewDatadogECSFargateTaskDefinition added in v2.3.0

func NewDatadogECSFargateTaskDefinition(scope constructs.Construct, id *string, props *awsecs.FargateTaskDefinitionProps, datadogProps *DatadogECSFargateProps) DatadogECSFargateTaskDefinition

type DatadogECSLogDriverProps added in v2.3.0

type DatadogECSLogDriverProps struct {
	Compress     *string `field:"optional" json:"compress" yaml:"compress"`
	HostEndpoint *string `field:"optional" json:"hostEndpoint" yaml:"hostEndpoint"`
	MessageKey   *string `field:"optional" json:"messageKey" yaml:"messageKey"`
	ServiceName  *string `field:"optional" json:"serviceName" yaml:"serviceName"`
	SourceName   *string `field:"optional" json:"sourceName" yaml:"sourceName"`
	Tls          *string `field:"optional" json:"tls" yaml:"tls"`
}

Datadog Fluentbit log driver configuration.

https://docs.fluentbit.io/manual/pipeline/outputs/datadog

type DatadogFirelensOptions added in v2.5.0

type DatadogFirelensOptions struct {
	// Custom configuration file, s3 or file.
	//
	// Both configFileType and configFileValue must be used together
	// to define a custom configuration source.
	// Default: - determined by checking configFileValue with S3 ARN.
	//
	ConfigFileType awsecs.FirelensConfigFileType `field:"optional" json:"configFileType" yaml:"configFileType"`
	// Custom configuration file, S3 ARN or a file path Both configFileType and configFileValue must be used together to define a custom configuration source.
	// Default: - no config file value.
	//
	ConfigFileValue *string `field:"optional" json:"configFileValue" yaml:"configFileValue"`
	// By default, Amazon ECS adds additional fields in your log entries that help identify the source of the logs.
	//
	// You can disable this action by setting enable-ecs-log-metadata to false.
	// Default: - true.
	//
	EnableECSLogMetadata *bool `field:"optional" json:"enableECSLogMetadata" yaml:"enableECSLogMetadata"`
	// Overrides the config file type and value to support JSON parsing.
	IsParseJson *bool `field:"optional" json:"isParseJson" yaml:"isParseJson"`
}

type DatadogLambda

type DatadogLambda interface {
	constructs.Construct
	ContextGitShaOverrideKey() *string
	SetContextGitShaOverrideKey(val *string)
	GitCommitShaOverride() *string
	SetGitCommitShaOverride(val *string)
	GitRepoUrlOverride() *string
	SetGitRepoUrlOverride(val *string)
	Lambdas() *[]interface{}
	SetLambdas(val *[]interface{})
	// The tree node.
	Node() constructs.Node
	Props() *DatadogLambdaProps
	SetProps(val *DatadogLambdaProps)
	Scope() constructs.Construct
	SetScope(val constructs.Construct)
	Transport() Transport
	SetTransport(val Transport)
	AddForwarderToNonLambdaLogGroups(logGroups *[]awslogs.ILogGroup)
	AddGitCommitMetadata(lambdaFunctions *[]interface{}, gitCommitSha *string, gitRepoUrl *string)
	AddLambdaFunctions(lambdaFunctions *[]interface{}, construct constructs.Construct)
	OverrideGitMetadata(gitCommitSha *string, gitRepoUrl *string)
	// Returns a string representation of this construct.
	ToString() *string
}

func NewDatadogLambda

func NewDatadogLambda(scope constructs.Construct, id *string, props *DatadogLambdaProps) DatadogLambda

type DatadogLambdaProps

type DatadogLambdaProps struct {
	AddLayers                  *bool                     `field:"optional" json:"addLayers" yaml:"addLayers"`
	ApiKey                     *string                   `field:"optional" json:"apiKey" yaml:"apiKey"`
	ApiKeySecret               awssecretsmanager.ISecret `field:"optional" json:"apiKeySecret" yaml:"apiKeySecret"`
	ApiKeySecretArn            *string                   `field:"optional" json:"apiKeySecretArn" yaml:"apiKeySecretArn"`
	ApiKmsKey                  *string                   `field:"optional" json:"apiKmsKey" yaml:"apiKmsKey"`
	ApmFlushDeadline           interface{}               `field:"optional" json:"apmFlushDeadline" yaml:"apmFlushDeadline"`
	CaptureCloudServicePayload *bool                     `field:"optional" json:"captureCloudServicePayload" yaml:"captureCloudServicePayload"`
	CaptureLambdaPayload       *bool                     `field:"optional" json:"captureLambdaPayload" yaml:"captureLambdaPayload"`
	ColdStartTraceSkipLibs     *string                   `field:"optional" json:"coldStartTraceSkipLibs" yaml:"coldStartTraceSkipLibs"`
	CreateForwarderPermissions *bool                     `field:"optional" json:"createForwarderPermissions" yaml:"createForwarderPermissions"`
	DecodeAuthorizerContext    *bool                     `field:"optional" json:"decodeAuthorizerContext" yaml:"decodeAuthorizerContext"`
	DotnetLayerArn             *string                   `field:"optional" json:"dotnetLayerArn" yaml:"dotnetLayerArn"`
	DotnetLayerVersion         *float64                  `field:"optional" json:"dotnetLayerVersion" yaml:"dotnetLayerVersion"`
	EnableColdStartTracing     *bool                     `field:"optional" json:"enableColdStartTracing" yaml:"enableColdStartTracing"`
	EnableDatadogASM           *bool                     `field:"optional" json:"enableDatadogASM" yaml:"enableDatadogASM"`
	EnableDatadogLogs          *bool                     `field:"optional" json:"enableDatadogLogs" yaml:"enableDatadogLogs"`
	EnableDatadogTracing       *bool                     `field:"optional" json:"enableDatadogTracing" yaml:"enableDatadogTracing"`
	EnableMergeXrayTraces      *bool                     `field:"optional" json:"enableMergeXrayTraces" yaml:"enableMergeXrayTraces"`
	EnableProfiling            *bool                     `field:"optional" json:"enableProfiling" yaml:"enableProfiling"`
	EncodeAuthorizerContext    *bool                     `field:"optional" json:"encodeAuthorizerContext" yaml:"encodeAuthorizerContext"`
	Env                        *string                   `field:"optional" json:"env" yaml:"env"`
	ExtensionLayerArn          *string                   `field:"optional" json:"extensionLayerArn" yaml:"extensionLayerArn"`
	ExtensionLayerVersion      *float64                  `field:"optional" json:"extensionLayerVersion" yaml:"extensionLayerVersion"`
	FlushMetricsToLogs         *bool                     `field:"optional" json:"flushMetricsToLogs" yaml:"flushMetricsToLogs"`
	ForwarderArn               *string                   `field:"optional" json:"forwarderArn" yaml:"forwarderArn"`
	GrantSecretReadAccess      *bool                     `field:"optional" json:"grantSecretReadAccess" yaml:"grantSecretReadAccess"`
	InjectLogContext           *bool                     `field:"optional" json:"injectLogContext" yaml:"injectLogContext"`
	JavaLayerArn               *string                   `field:"optional" json:"javaLayerArn" yaml:"javaLayerArn"`
	JavaLayerVersion           *float64                  `field:"optional" json:"javaLayerVersion" yaml:"javaLayerVersion"`
	LlmObsAgentlessEnabled     *bool                     `field:"optional" json:"llmObsAgentlessEnabled" yaml:"llmObsAgentlessEnabled"`
	LlmObsEnabled              *bool                     `field:"optional" json:"llmObsEnabled" yaml:"llmObsEnabled"`
	LlmObsMlApp                *string                   `field:"optional" json:"llmObsMlApp" yaml:"llmObsMlApp"`
	LogLevel                   *string                   `field:"optional" json:"logLevel" yaml:"logLevel"`
	MinColdStartTraceDuration  *float64                  `field:"optional" json:"minColdStartTraceDuration" yaml:"minColdStartTraceDuration"`
	NodeLayerArn               *string                   `field:"optional" json:"nodeLayerArn" yaml:"nodeLayerArn"`
	NodeLayerVersion           *float64                  `field:"optional" json:"nodeLayerVersion" yaml:"nodeLayerVersion"`
	PythonLayerArn             *string                   `field:"optional" json:"pythonLayerArn" yaml:"pythonLayerArn"`
	PythonLayerVersion         *float64                  `field:"optional" json:"pythonLayerVersion" yaml:"pythonLayerVersion"`
	RedirectHandler            *bool                     `field:"optional" json:"redirectHandler" yaml:"redirectHandler"`
	RubyLayerArn               *string                   `field:"optional" json:"rubyLayerArn" yaml:"rubyLayerArn"`
	RubyLayerVersion           *float64                  `field:"optional" json:"rubyLayerVersion" yaml:"rubyLayerVersion"`
	Service                    *string                   `field:"optional" json:"service" yaml:"service"`
	Site                       *string                   `field:"optional" json:"site" yaml:"site"`
	SourceCodeIntegration      *bool                     `field:"optional" json:"sourceCodeIntegration" yaml:"sourceCodeIntegration"`
	Tags                       *string                   `field:"optional" json:"tags" yaml:"tags"`
	UseLayersFromAccount       *string                   `field:"optional" json:"useLayersFromAccount" yaml:"useLayersFromAccount"`
	Version                    *string                   `field:"optional" json:"version" yaml:"version"`
}

type DatadogLambdaStrictProps

type DatadogLambdaStrictProps struct {
	AddLayers                  *bool                     `field:"required" json:"addLayers" yaml:"addLayers"`
	CaptureCloudServicePayload *bool                     `field:"required" json:"captureCloudServicePayload" yaml:"captureCloudServicePayload"`
	CaptureLambdaPayload       *bool                     `field:"required" json:"captureLambdaPayload" yaml:"captureLambdaPayload"`
	EnableDatadogASM           *bool                     `field:"required" json:"enableDatadogASM" yaml:"enableDatadogASM"`
	EnableDatadogLogs          *bool                     `field:"required" json:"enableDatadogLogs" yaml:"enableDatadogLogs"`
	EnableDatadogTracing       *bool                     `field:"required" json:"enableDatadogTracing" yaml:"enableDatadogTracing"`
	EnableMergeXrayTraces      *bool                     `field:"required" json:"enableMergeXrayTraces" yaml:"enableMergeXrayTraces"`
	GrantSecretReadAccess      *bool                     `field:"required" json:"grantSecretReadAccess" yaml:"grantSecretReadAccess"`
	InjectLogContext           *bool                     `field:"required" json:"injectLogContext" yaml:"injectLogContext"`
	ApiKey                     *string                   `field:"optional" json:"apiKey" yaml:"apiKey"`
	ApiKeySecret               awssecretsmanager.ISecret `field:"optional" json:"apiKeySecret" yaml:"apiKeySecret"`
	ApiKeySecretArn            *string                   `field:"optional" json:"apiKeySecretArn" yaml:"apiKeySecretArn"`
	ApiKmsKey                  *string                   `field:"optional" json:"apiKmsKey" yaml:"apiKmsKey"`
	ExtensionLayerArn          *string                   `field:"optional" json:"extensionLayerArn" yaml:"extensionLayerArn"`
	ExtensionLayerVersion      *float64                  `field:"optional" json:"extensionLayerVersion" yaml:"extensionLayerVersion"`
	FlushMetricsToLogs         *bool                     `field:"optional" json:"flushMetricsToLogs" yaml:"flushMetricsToLogs"`
	ForwarderArn               *string                   `field:"optional" json:"forwarderArn" yaml:"forwarderArn"`
	JavaLayerArn               *string                   `field:"optional" json:"javaLayerArn" yaml:"javaLayerArn"`
	JavaLayerVersion           *float64                  `field:"optional" json:"javaLayerVersion" yaml:"javaLayerVersion"`
	LogLevel                   *string                   `field:"optional" json:"logLevel" yaml:"logLevel"`
	NodeLayerArn               *string                   `field:"optional" json:"nodeLayerArn" yaml:"nodeLayerArn"`
	NodeLayerVersion           *float64                  `field:"optional" json:"nodeLayerVersion" yaml:"nodeLayerVersion"`
	PythonLayerArn             *string                   `field:"optional" json:"pythonLayerArn" yaml:"pythonLayerArn"`
	PythonLayerVersion         *float64                  `field:"optional" json:"pythonLayerVersion" yaml:"pythonLayerVersion"`
	RedirectHandler            *bool                     `field:"optional" json:"redirectHandler" yaml:"redirectHandler"`
	Site                       *string                   `field:"optional" json:"site" yaml:"site"`
	SourceCodeIntegration      *bool                     `field:"optional" json:"sourceCodeIntegration" yaml:"sourceCodeIntegration"`
}

type DatadogStepFunctions

type DatadogStepFunctions interface {
	constructs.Construct
	// The tree node.
	Node() constructs.Node
	Props() *DatadogStepFunctionsProps
	SetProps(val *DatadogStepFunctionsProps)
	Scope() constructs.Construct
	SetScope(val constructs.Construct)
	Stack() awscdk.Stack
	SetStack(val awscdk.Stack)
	AddStateMachines(stateMachines *[]awsstepfunctions.StateMachine, construct constructs.Construct)
	// Returns a string representation of this construct.
	ToString() *string
}

func NewDatadogStepFunctions

func NewDatadogStepFunctions(scope constructs.Construct, id *string, props *DatadogStepFunctionsProps) DatadogStepFunctions

type DatadogStepFunctionsProps

type DatadogStepFunctionsProps struct {
	Env          *string `field:"optional" json:"env" yaml:"env"`
	ForwarderArn *string `field:"optional" json:"forwarderArn" yaml:"forwarderArn"`
	Service      *string `field:"optional" json:"service" yaml:"service"`
	Tags         *string `field:"optional" json:"tags" yaml:"tags"`
	Version      *string `field:"optional" json:"version" yaml:"version"`
}

type DogstatsdFeatureConfig added in v2.3.0

type DogstatsdFeatureConfig struct {
	// Controls the cardinality of custom dogstatsd metrics.
	DogstatsdCardinality Cardinality `field:"optional" json:"dogstatsdCardinality" yaml:"dogstatsdCardinality"`
	// Enables Dogstatsd.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
	// Enables Dogstatsd origin detection.
	IsOriginDetectionEnabled *bool `field:"optional" json:"isOriginDetectionEnabled" yaml:"isOriginDetectionEnabled"`
	// Enables Dogstatsd traffic over Unix Domain Socket.
	//
	// Falls back to UDP configuration for application containers when disabled.
	IsSocketEnabled *bool `field:"optional" json:"isSocketEnabled" yaml:"isSocketEnabled"`
}

Dogstatsd feature configuration.

type FargateCWSFeatureConfig added in v2.3.0

type FargateCWSFeatureConfig struct {
	// Enables CWS.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
	// The minimum number of CPU units to reserve for the Datadog CWS init container.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// The amount (in MiB) of memory to present to the Datadog CWS init container.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
}

type FargateLogCollectionFeatureConfig added in v2.3.0

type FargateLogCollectionFeatureConfig struct {
	// Enables log collection.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
	// Fluentbit log collection configuration.
	FluentbitConfig *FluentbitConfig `field:"optional" json:"fluentbitConfig" yaml:"fluentbitConfig"`
	// Type of log collection.
	LoggingType LoggingType `field:"optional" json:"loggingType" yaml:"loggingType"`
}

type FluentbitConfig added in v2.3.0

type FluentbitConfig struct {
	// The minimum number of CPU units to reserve for the Datadog fluent-bit container.
	Cpu *float64 `field:"optional" json:"cpu" yaml:"cpu"`
	// Firelens options for the Fluentbit container.
	FirelensOptions *DatadogFirelensOptions `field:"optional" json:"firelensOptions" yaml:"firelensOptions"`
	// The version of the Fluentbit container image to use.
	ImageVersion *string `field:"optional" json:"imageVersion" yaml:"imageVersion"`
	// Enables the log router health check.
	IsLogRouterDependencyEnabled *bool `field:"optional" json:"isLogRouterDependencyEnabled" yaml:"isLogRouterDependencyEnabled"`
	// Makes the log router essential.
	IsLogRouterEssential *bool `field:"optional" json:"isLogRouterEssential" yaml:"isLogRouterEssential"`
	// Configuration for the Datadog log driver.
	LogDriverConfig *DatadogECSLogDriverProps `field:"optional" json:"logDriverConfig" yaml:"logDriverConfig"`
	// Health check configuration for the log router.
	LogRouterHealthCheck *awsecs.HealthCheck `field:"optional" json:"logRouterHealthCheck" yaml:"logRouterHealthCheck"`
	// The amount (in MiB) of memory to present to the Datadog fluent-bit container.
	MemoryLimitMiB *float64 `field:"optional" json:"memoryLimitMiB" yaml:"memoryLimitMiB"`
	// The registry to pull the Fluentbit container image from.
	Registry *string `field:"optional" json:"registry" yaml:"registry"`
}

type LogCollectionFeatureConfig added in v2.3.0

type LogCollectionFeatureConfig struct {
	// Enables log collection.
	IsEnabled *bool `field:"optional" json:"isEnabled" yaml:"isEnabled"`
}

Log collection feature configuration.

type LoggingType added in v2.3.0

type LoggingType string

Type of datadog logging configuration.

const (
	// Forwarding logs to Datadog using Fluentbit container.
	//
	// Only compatible on Linux.
	LoggingType_FLUENTBIT LoggingType = "FLUENTBIT"
)

type Node

type Node struct {
	DefaultChild interface{} `field:"required" json:"defaultChild" yaml:"defaultChild"`
}

type Runtime

type Runtime struct {
	Name *string `field:"required" json:"name" yaml:"name"`
}

type RuntimeType

type RuntimeType string
const (
	RuntimeType_DOTNET      RuntimeType = "DOTNET"
	RuntimeType_NODE        RuntimeType = "NODE"
	RuntimeType_PYTHON      RuntimeType = "PYTHON"
	RuntimeType_JAVA        RuntimeType = "JAVA"
	RuntimeType_RUBY        RuntimeType = "RUBY"
	RuntimeType_CUSTOM      RuntimeType = "CUSTOM"
	RuntimeType_UNSUPPORTED RuntimeType = "UNSUPPORTED"
)

type TagKeys

type TagKeys string
const (
	TagKeys_CDK              TagKeys = "CDK"
	TagKeys_ENV              TagKeys = "ENV"
	TagKeys_SERVICE          TagKeys = "SERVICE"
	TagKeys_VERSION          TagKeys = "VERSION"
	TagKeys_DD_TRACE_ENABLED TagKeys = "DD_TRACE_ENABLED"
)

type Transport

type Transport interface {
	ApiKey() *string
	SetApiKey(val *string)
	ApiKeySecretArn() *string
	SetApiKeySecretArn(val *string)
	ApiKmsKey() *string
	SetApiKmsKey(val *string)
	ExtensionLayerArn() *string
	SetExtensionLayerArn(val *string)
	ExtensionLayerVersion() *float64
	SetExtensionLayerVersion(val *float64)
	FlushMetricsToLogs() *bool
	SetFlushMetricsToLogs(val *bool)
	Site() *string
	SetSite(val *string)
	ApplyEnvVars(lam awslambda.Function)
}

func NewTransport

func NewTransport(flushMetricsToLogs *bool, site *string, apiKey *string, apiKeySecretArn *string, apiKmsKey *string, extensionLayerVersion *float64, extensionLayerArn *string) Transport

Directories

Path Synopsis
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.
Package jsii contains the functionaility needed for jsii packages to initialize their dependencies and themselves.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL