datadog-cdk-constructs-v2 2.1.0__tar.gz → 2.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. {datadog_cdk_constructs_v2-2.1.0/src/datadog_cdk_constructs_v2.egg-info → datadog_cdk_constructs_v2-2.2.0}/PKG-INFO +37 -21
  2. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/README.md +34 -18
  3. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/setup.py +4 -4
  4. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2/__init__.py +236 -19
  5. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2/_jsii/__init__.py +2 -2
  6. datadog_cdk_constructs_v2-2.2.0/src/datadog_cdk_constructs_v2/_jsii/datadog-cdk-constructs-v2@2.2.0.jsii.tgz +0 -0
  7. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0/src/datadog_cdk_constructs_v2.egg-info}/PKG-INFO +37 -21
  8. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2.egg-info/SOURCES.txt +1 -1
  9. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2.egg-info/requires.txt +2 -2
  10. datadog_cdk_constructs_v2-2.1.0/src/datadog_cdk_constructs_v2/_jsii/datadog-cdk-constructs-v2@2.1.0.jsii.tgz +0 -0
  11. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/LICENSE +0 -0
  12. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/MANIFEST.in +0 -0
  13. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/NOTICE +0 -0
  14. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/pyproject.toml +0 -0
  15. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/setup.cfg +0 -0
  16. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2/py.typed +0 -0
  17. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2.egg-info/dependency_links.txt +0 -0
  18. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.2.0}/src/datadog_cdk_constructs_v2.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datadog-cdk-constructs-v2
3
- Version: 2.1.0
3
+ Version: 2.2.0
4
4
  Summary: CDK Construct Library to automatically instrument Python and Node Lambda functions with Datadog using AWS CDK v2
5
5
  Home-page: https://github.com/DataDog/datadog-cdk-constructs
6
6
  Author: Datadog
@@ -21,9 +21,9 @@ Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
23
  License-File: NOTICE
24
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.146.0
24
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.177.0
25
25
  Requires-Dist: constructs<11.0.0,>=10.0.5
26
- Requires-Dist: jsii<2.0.0,>=1.106.0
26
+ Requires-Dist: jsii<2.0.0,>=1.108.0
27
27
  Requires-Dist: publication>=0.0.3
28
28
  Requires-Dist: typeguard<4.3.0,>=2.13.3
29
29
 
@@ -99,7 +99,7 @@ Pay attention to the output from your package manager as the `Datadog CDK Constr
99
99
  For use with AWS CDK v2:
100
100
 
101
101
  ```
102
- go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct
102
+ go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2
103
103
  ```
104
104
 
105
105
  AWS CDK v1 is not supported.
@@ -150,7 +150,7 @@ datadogLambda.addForwarderToNonLambdaLogGroups([<LOG_GROUPS>])
150
150
 
151
151
  ```go
152
152
  import (
153
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
153
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
154
154
  )
155
155
  datadogLambda := ddcdkconstruct.NewDatadogLambda(
156
156
  stack,
@@ -245,29 +245,34 @@ To further configure your DatadogLambda construct for Lambda, use the following
245
245
  | npm package parameter | PyPI package parameter | Description |
246
246
  | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
247
247
  | `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. |
248
- | `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](https://github.com/DataDog/datadog-lambda-python/releases). |
249
- | `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](https://github.com/DataDog/datadog-lambda-js/releases). |
250
- | `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](https://docs.datadoghq.com/serverless/installation/java/?tab=awscdk). **Note**: `extensionLayerVersion >= 25` and `javaLayerVersion >= 5` are required for the DatadogLambda construct to instrument your Java functions properly. |
251
- | `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](https://github.com/DataDog/dd-trace-dotnet-aws-lambda-layer/releases). |
252
- | `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` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **Note**: If this parameter is set, it adds a layer even if `addLayers` is set to `false`. |
253
- | `forwarderArn` | `forwarder_arn` | When set, the plugin will automatically subscribe the Datadog Forwarder to the functions' log groups. Do not set `forwarderArn` when `extensionLayerVersion` is set. |
248
+ | `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](https://github.com/DataDog/datadog-lambda-python/releases). **Warning**: This parameter and `pythonLayerArn` are mutually exclusive. If used, only set one or the other. |
249
+ | `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. |
250
+ | `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](https://github.com/DataDog/datadog-lambda-js/releases). **Warning**: This parameter and `nodeLayerArn` are mutually exclusive. If used, only set one or the other. |
251
+ | `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. |
252
+ | `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](https://docs.datadoghq.com/serverless/installation/java/?tab=awscdk). **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. |
253
+ | `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. |
254
+ | `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](https://github.com/DataDog/dd-trace-dotnet-aws-lambda-layer/releases). **Warning**: This parameter and `dotnetLayerArn` are mutually exclusive. If used, only set one or the other. |
255
+ | `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. . |
256
+ | `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` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **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`. |
257
+ | `extensionLayerArn` | `extension_layer_arn` | The custom ARN of the Datadog Lambda Extension layer to install. When `extensionLayerArn` is set, `apiKey` (or if encrypted, `apiKMSKey` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **Warning**: This parameter and`extensionLayerVersion` 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`. |
258
+ | `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. |
254
259
  | `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. |
255
260
  | `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` or `apiKeySecretArn`). |
256
- | `site` | `site` | Set which Datadog site to send data. This is only used when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set. Possible values are `datadoghq.com`, `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`, and `ddog-gov.com`. The default is `datadoghq.com`. |
257
- | `apiKey` | `api_key` | Datadog API Key, only needed when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set. For more information about getting a Datadog API key, see the [API key documentation](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys). |
261
+ | `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`, and `ddog-gov.com`. The default is `datadoghq.com`. |
262
+ | `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](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys). |
258
263
  | `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. |
259
264
  | `apiKeySecret` | `api_key_secret` | An [AWS CDK ISecret](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecret.html) 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](#automatically-grant-aws-secret-read-access-to-lambda-execution-role) for an example. **Only available in datadog-cdk-constructs-v2**. |
260
- | `apiKmsKey` | `api_kms_key` | Datadog API Key encrypted using KMS. Use this parameter in place of `apiKey` when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set, and you are using KMS encryption. |
265
+ | `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. |
261
266
  | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
262
267
  | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
263
268
  | `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. |
264
269
  | `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](#alternative-methods-to-enable-source-code-integration). Learn more [here](https://docs.datadoghq.com/integrations/guide/source-code-integration/). Defaults to `true`. |
265
270
  | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
266
271
  | `logLevel` | `log_level` | When set to `debug`, the Datadog Lambda Library and Extension will log additional information to help troubleshoot issues. |
267
- | `env` | `env` | When set along with `extensionLayerVersion`, 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. |
268
- | `service` | `service` | When set along with `extensionLayerVersion`, 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. |
269
- | `version` | `version` | When set along with `extensionLayerVersion`, 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. |
270
- | `tags` | `tags` | A comma separated list of key:value pairs as a single string. When set along with `extensionLayerVersion`, 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. |
272
+ | `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. |
273
+ | `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. |
274
+ | `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. |
275
+ | `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. |
271
276
  | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
272
277
  | `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`. |
273
278
  | `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. |
@@ -287,7 +292,7 @@ Enable X-Ray Tracing on your Lambda functions. For more information, see [CDK do
287
292
  import * as lambda from "aws-cdk-lib/aws-lambda";
288
293
 
289
294
  const lambda_function = new lambda.Function(this, "HelloHandler", {
290
- runtime: lambda.Runtime.NODEJS_14_X,
295
+ runtime: lambda.Runtime.NODEJS_18_X,
291
296
  code: lambda.Code.fromAsset("lambda"),
292
297
  handler: "hello.handler",
293
298
  tracing: lambda.Tracing.ACTIVE,
@@ -537,7 +542,7 @@ Example stack: [step-functions-go-stack](https://github.com/DataDog/datadog-cdk-
537
542
 
538
543
  ```
539
544
  import (
540
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
545
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
541
546
  "github.com/aws/aws-cdk-go/awscdk/v2"
542
547
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
543
548
  )
@@ -564,7 +569,7 @@ To merge the Step Function's traces with downstream Lambda function or Step func
564
569
 
565
570
  ```
566
571
  import (
567
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
572
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
568
573
  "github.com/aws/aws-cdk-go/awscdk/v2/awslambda"
569
574
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
570
575
  sfntasks "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks"
@@ -690,6 +695,17 @@ In February 2025, Datadog released a major version update from `1.x.x` to `2.x.x
690
695
  2. `DatadogProps` -> `DatadogLambdaProps`
691
696
  For examples, see the [Usage](#usage) section of this page and [examples/](https://github.com/DataDog/datadog-cdk-constructs/tree/main/examples) folder of the GitHub repository.
692
697
  2. Upgrade Node.js version to `18.18.0` or above.
698
+ 3. For Go, change the import from:
699
+
700
+ ```
701
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
702
+ ```
703
+
704
+ to:
705
+
706
+ ```
707
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
708
+ ```
693
709
 
694
710
  ## Opening Issues
695
711
 
@@ -70,7 +70,7 @@ Pay attention to the output from your package manager as the `Datadog CDK Constr
70
70
  For use with AWS CDK v2:
71
71
 
72
72
  ```
73
- go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct
73
+ go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2
74
74
  ```
75
75
 
76
76
  AWS CDK v1 is not supported.
@@ -121,7 +121,7 @@ datadogLambda.addForwarderToNonLambdaLogGroups([<LOG_GROUPS>])
121
121
 
122
122
  ```go
123
123
  import (
124
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
124
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
125
125
  )
126
126
  datadogLambda := ddcdkconstruct.NewDatadogLambda(
127
127
  stack,
@@ -216,29 +216,34 @@ To further configure your DatadogLambda construct for Lambda, use the following
216
216
  | npm package parameter | PyPI package parameter | Description |
217
217
  | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
218
218
  | `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. |
219
- | `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](https://github.com/DataDog/datadog-lambda-python/releases). |
220
- | `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](https://github.com/DataDog/datadog-lambda-js/releases). |
221
- | `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](https://docs.datadoghq.com/serverless/installation/java/?tab=awscdk). **Note**: `extensionLayerVersion >= 25` and `javaLayerVersion >= 5` are required for the DatadogLambda construct to instrument your Java functions properly. |
222
- | `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](https://github.com/DataDog/dd-trace-dotnet-aws-lambda-layer/releases). |
223
- | `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` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **Note**: If this parameter is set, it adds a layer even if `addLayers` is set to `false`. |
224
- | `forwarderArn` | `forwarder_arn` | When set, the plugin will automatically subscribe the Datadog Forwarder to the functions' log groups. Do not set `forwarderArn` when `extensionLayerVersion` is set. |
219
+ | `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](https://github.com/DataDog/datadog-lambda-python/releases). **Warning**: This parameter and `pythonLayerArn` are mutually exclusive. If used, only set one or the other. |
220
+ | `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. |
221
+ | `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](https://github.com/DataDog/datadog-lambda-js/releases). **Warning**: This parameter and `nodeLayerArn` are mutually exclusive. If used, only set one or the other. |
222
+ | `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. |
223
+ | `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](https://docs.datadoghq.com/serverless/installation/java/?tab=awscdk). **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. |
224
+ | `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. |
225
+ | `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](https://github.com/DataDog/dd-trace-dotnet-aws-lambda-layer/releases). **Warning**: This parameter and `dotnetLayerArn` are mutually exclusive. If used, only set one or the other. |
226
+ | `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. . |
227
+ | `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` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **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`. |
228
+ | `extensionLayerArn` | `extension_layer_arn` | The custom ARN of the Datadog Lambda Extension layer to install. When `extensionLayerArn` is set, `apiKey` (or if encrypted, `apiKMSKey` 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](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/). **Warning**: This parameter and`extensionLayerVersion` 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`. |
229
+ | `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. |
225
230
  | `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. |
226
231
  | `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` or `apiKeySecretArn`). |
227
- | `site` | `site` | Set which Datadog site to send data. This is only used when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set. Possible values are `datadoghq.com`, `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`, and `ddog-gov.com`. The default is `datadoghq.com`. |
228
- | `apiKey` | `api_key` | Datadog API Key, only needed when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set. For more information about getting a Datadog API key, see the [API key documentation](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys). |
232
+ | `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`, and `ddog-gov.com`. The default is `datadoghq.com`. |
233
+ | `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](https://docs.datadoghq.com/account_management/api-app-keys/#api-keys). |
229
234
  | `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. |
230
235
  | `apiKeySecret` | `api_key_secret` | An [AWS CDK ISecret](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.ISecret.html) 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](#automatically-grant-aws-secret-read-access-to-lambda-execution-role) for an example. **Only available in datadog-cdk-constructs-v2**. |
231
- | `apiKmsKey` | `api_kms_key` | Datadog API Key encrypted using KMS. Use this parameter in place of `apiKey` when `flushMetricsToLogs` is `false` or `extensionLayerVersion` is set, and you are using KMS encryption. |
236
+ | `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. |
232
237
  | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
233
238
  | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
234
239
  | `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. |
235
240
  | `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](#alternative-methods-to-enable-source-code-integration). Learn more [here](https://docs.datadoghq.com/integrations/guide/source-code-integration/). Defaults to `true`. |
236
241
  | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
237
242
  | `logLevel` | `log_level` | When set to `debug`, the Datadog Lambda Library and Extension will log additional information to help troubleshoot issues. |
238
- | `env` | `env` | When set along with `extensionLayerVersion`, 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. |
239
- | `service` | `service` | When set along with `extensionLayerVersion`, 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. |
240
- | `version` | `version` | When set along with `extensionLayerVersion`, 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. |
241
- | `tags` | `tags` | A comma separated list of key:value pairs as a single string. When set along with `extensionLayerVersion`, 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. |
243
+ | `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. |
244
+ | `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. |
245
+ | `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. |
246
+ | `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. |
242
247
  | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
243
248
  | `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`. |
244
249
  | `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. |
@@ -258,7 +263,7 @@ Enable X-Ray Tracing on your Lambda functions. For more information, see [CDK do
258
263
  import * as lambda from "aws-cdk-lib/aws-lambda";
259
264
 
260
265
  const lambda_function = new lambda.Function(this, "HelloHandler", {
261
- runtime: lambda.Runtime.NODEJS_14_X,
266
+ runtime: lambda.Runtime.NODEJS_18_X,
262
267
  code: lambda.Code.fromAsset("lambda"),
263
268
  handler: "hello.handler",
264
269
  tracing: lambda.Tracing.ACTIVE,
@@ -508,7 +513,7 @@ Example stack: [step-functions-go-stack](https://github.com/DataDog/datadog-cdk-
508
513
 
509
514
  ```
510
515
  import (
511
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
516
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
512
517
  "github.com/aws/aws-cdk-go/awscdk/v2"
513
518
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
514
519
  )
@@ -535,7 +540,7 @@ To merge the Step Function's traces with downstream Lambda function or Step func
535
540
 
536
541
  ```
537
542
  import (
538
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
543
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
539
544
  "github.com/aws/aws-cdk-go/awscdk/v2/awslambda"
540
545
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
541
546
  sfntasks "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks"
@@ -661,6 +666,17 @@ In February 2025, Datadog released a major version update from `1.x.x` to `2.x.x
661
666
  2. `DatadogProps` -> `DatadogLambdaProps`
662
667
  For examples, see the [Usage](#usage) section of this page and [examples/](https://github.com/DataDog/datadog-cdk-constructs/tree/main/examples) folder of the GitHub repository.
663
668
  2. Upgrade Node.js version to `18.18.0` or above.
669
+ 3. For Go, change the import from:
670
+
671
+ ```
672
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
673
+ ```
674
+
675
+ to:
676
+
677
+ ```
678
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
679
+ ```
664
680
 
665
681
  ## Opening Issues
666
682
 
@@ -5,7 +5,7 @@ kwargs = json.loads(
5
5
  """
6
6
  {
7
7
  "name": "datadog-cdk-constructs-v2",
8
- "version": "2.1.0",
8
+ "version": "2.2.0",
9
9
  "description": "CDK Construct Library to automatically instrument Python and Node Lambda functions with Datadog using AWS CDK v2",
10
10
  "license": "Apache-2.0",
11
11
  "url": "https://github.com/DataDog/datadog-cdk-constructs",
@@ -26,7 +26,7 @@ kwargs = json.loads(
26
26
  ],
27
27
  "package_data": {
28
28
  "datadog_cdk_constructs_v2._jsii": [
29
- "datadog-cdk-constructs-v2@2.1.0.jsii.tgz"
29
+ "datadog-cdk-constructs-v2@2.2.0.jsii.tgz"
30
30
  ],
31
31
  "datadog_cdk_constructs_v2": [
32
32
  "py.typed"
@@ -34,9 +34,9 @@ kwargs = json.loads(
34
34
  },
35
35
  "python_requires": "~=3.8",
36
36
  "install_requires": [
37
- "aws-cdk-lib>=2.146.0, <3.0.0",
37
+ "aws-cdk-lib>=2.177.0, <3.0.0",
38
38
  "constructs>=10.0.5, <11.0.0",
39
- "jsii>=1.106.0, <2.0.0",
39
+ "jsii>=1.108.0, <2.0.0",
40
40
  "publication>=0.0.3",
41
41
  "typeguard>=2.13.3,<4.3.0"
42
42
  ],