datadog-cdk-constructs-v2 2.1.0__tar.gz → 2.3.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 (19) hide show
  1. {datadog_cdk_constructs_v2-2.1.0/src/datadog_cdk_constructs_v2.egg-info → datadog_cdk_constructs_v2-2.3.0}/PKG-INFO +62 -44
  2. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/README.md +58 -39
  3. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/pyproject.toml +2 -2
  4. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/setup.py +5 -6
  5. datadog_cdk_constructs_v2-2.3.0/src/datadog_cdk_constructs_v2/__init__.py +4568 -0
  6. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/src/datadog_cdk_constructs_v2/_jsii/__init__.py +2 -2
  7. datadog_cdk_constructs_v2-2.3.0/src/datadog_cdk_constructs_v2/_jsii/datadog-cdk-constructs-v2@2.3.0.jsii.tgz +0 -0
  8. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0/src/datadog_cdk_constructs_v2.egg-info}/PKG-INFO +62 -44
  9. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/src/datadog_cdk_constructs_v2.egg-info/SOURCES.txt +1 -1
  10. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/src/datadog_cdk_constructs_v2.egg-info/requires.txt +2 -2
  11. datadog_cdk_constructs_v2-2.1.0/src/datadog_cdk_constructs_v2/__init__.py +0 -2453
  12. datadog_cdk_constructs_v2-2.1.0/src/datadog_cdk_constructs_v2/_jsii/datadog-cdk-constructs-v2@2.1.0.jsii.tgz +0 -0
  13. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/LICENSE +0 -0
  14. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/MANIFEST.in +0 -0
  15. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/NOTICE +0 -0
  16. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/setup.cfg +0 -0
  17. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/src/datadog_cdk_constructs_v2/py.typed +0 -0
  18. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.0}/src/datadog_cdk_constructs_v2.egg-info/dependency_links.txt +0 -0
  19. {datadog_cdk_constructs_v2-2.1.0 → datadog_cdk_constructs_v2-2.3.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.3.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
@@ -10,20 +10,19 @@ Classifier: Intended Audience :: Developers
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: JavaScript
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Classifier: Programming Language :: Python :: 3.8
14
13
  Classifier: Programming Language :: Python :: 3.9
15
14
  Classifier: Programming Language :: Python :: 3.10
16
15
  Classifier: Programming Language :: Python :: 3.11
17
16
  Classifier: Typing :: Typed
18
17
  Classifier: Development Status :: 5 - Production/Stable
19
18
  Classifier: License :: OSI Approved
20
- Requires-Python: ~=3.8
19
+ Requires-Python: ~=3.9
21
20
  Description-Content-Type: text/markdown
22
21
  License-File: LICENSE
23
22
  License-File: NOTICE
24
- Requires-Dist: aws-cdk-lib<3.0.0,>=2.146.0
23
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.177.0
25
24
  Requires-Dist: constructs<11.0.0,>=10.0.5
26
- Requires-Dist: jsii<2.0.0,>=1.106.0
25
+ Requires-Dist: jsii<2.0.0,>=1.111.0
27
26
  Requires-Dist: publication>=0.0.3
28
27
  Requires-Dist: typeguard<4.3.0,>=2.13.3
29
28
 
@@ -99,7 +98,7 @@ Pay attention to the output from your package manager as the `Datadog CDK Constr
99
98
  For use with AWS CDK v2:
100
99
 
101
100
  ```
102
- go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct
101
+ go get github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2
103
102
  ```
104
103
 
105
104
  AWS CDK v1 is not supported.
@@ -150,7 +149,7 @@ datadogLambda.addForwarderToNonLambdaLogGroups([<LOG_GROUPS>])
150
149
 
151
150
  ```go
152
151
  import (
153
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
152
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
154
153
  )
155
154
  datadogLambda := ddcdkconstruct.NewDatadogLambda(
156
155
  stack,
@@ -242,40 +241,48 @@ To further configure your DatadogLambda construct for Lambda, use the following
242
241
 
243
242
  *Note*: The descriptions use the npm package parameters, but they also apply to PyPI and Go package parameters.
244
243
 
245
- | npm package parameter | PyPI package parameter | Description |
246
- | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
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. |
254
- | `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
- | `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). |
258
- | `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
- | `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. |
261
- | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
262
- | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
263
- | `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
- | `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
- | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
266
- | `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. |
271
- | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
272
- | `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
- | `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. |
274
- | `enableProfiling` | `enable_profiling` | Enable the Datadog Continuous Profiler with `true`. Supported in Beta for Node.js and Python. Defaults to `false`. |
275
- | `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`. |
276
- | `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`. |
277
- | `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. |
278
- | `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`. |
244
+ | npm package parameter | PyPI package parameter | Description |
245
+ | ---------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
246
+ | `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. |
247
+ | `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. |
248
+ | `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. |
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). **Warning**: This parameter and `nodeLayerArn` are mutually exclusive. If used, only set one or the other. |
250
+ | `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. |
251
+ | `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. |
252
+ | `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. |
253
+ | `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. |
254
+ | `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. . |
255
+ | `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`. |
256
+ | `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`. |
257
+ | `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. |
258
+ | `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. |
259
+ | `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`). |
260
+ | `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`. |
261
+ | `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). |
262
+ | `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. |
263
+ | `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**. |
264
+ | `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. |
265
+ | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
266
+ | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
267
+ | `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. |
268
+ | `enableDatadogASM` | `enable_datadog_asm` | Enable [Datadog Application Security Management (ASM)](https://docs.datadoghq.com/security/application_security/) on the Lambda function. Requires the Datadog extension to be present (using `extensionLayerVersion` or `extensionLayerArn`) and `enableDatadogTracing`. Defaults to `false`. |
269
+ | `captureLambdaPayload` | `capture_lambda_payload` | [Captures incoming and outgoing AWS Lambda payloads](https://www.datadoghq.com/blog/troubleshoot-lambda-function-request-response-payloads/) in the Datadog APM spans for Lambda invocations. Defaults to `false`. |
270
+ | `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`. |
271
+ | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
272
+ | `logLevel` | `log_level` | When set to `debug`, the Datadog Lambda Library and Extension will log additional information to help troubleshoot issues. |
273
+ | `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. |
274
+ | `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. |
275
+ | `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. |
276
+ | `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. |
277
+ | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
278
+ | `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`. |
279
+ | `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. |
280
+ | `enableProfiling` | `enable_profiling` | Enable the Datadog Continuous Profiler with `true`. Supported in Beta for Node.js and Python. Defaults to `false`. |
281
+ | `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`. |
282
+ | `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`. |
283
+ | `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. |
284
+ | `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`. |
285
+ | `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`. |
279
286
 
280
287
  **Note**: Using the parameters above may override corresponding function level `DD_XXX` environment variables.
281
288
 
@@ -287,7 +294,7 @@ Enable X-Ray Tracing on your Lambda functions. For more information, see [CDK do
287
294
  import * as lambda from "aws-cdk-lib/aws-lambda";
288
295
 
289
296
  const lambda_function = new lambda.Function(this, "HelloHandler", {
290
- runtime: lambda.Runtime.NODEJS_14_X,
297
+ runtime: lambda.Runtime.NODEJS_18_X,
291
298
  code: lambda.Code.fromAsset("lambda"),
292
299
  handler: "hello.handler",
293
300
  tracing: lambda.Tracing.ACTIVE,
@@ -537,7 +544,7 @@ Example stack: [step-functions-go-stack](https://github.com/DataDog/datadog-cdk-
537
544
 
538
545
  ```
539
546
  import (
540
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
547
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
541
548
  "github.com/aws/aws-cdk-go/awscdk/v2"
542
549
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
543
550
  )
@@ -564,7 +571,7 @@ To merge the Step Function's traces with downstream Lambda function or Step func
564
571
 
565
572
  ```
566
573
  import (
567
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
574
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
568
575
  "github.com/aws/aws-cdk-go/awscdk/v2/awslambda"
569
576
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
570
577
  sfntasks "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks"
@@ -690,6 +697,17 @@ In February 2025, Datadog released a major version update from `1.x.x` to `2.x.x
690
697
  2. `DatadogProps` -> `DatadogLambdaProps`
691
698
  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
699
  2. Upgrade Node.js version to `18.18.0` or above.
700
+ 3. For Go, change the import from:
701
+
702
+ ```
703
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
704
+ ```
705
+
706
+ to:
707
+
708
+ ```
709
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
710
+ ```
693
711
 
694
712
  ## Opening Issues
695
713
 
@@ -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,
@@ -213,40 +213,48 @@ To further configure your DatadogLambda construct for Lambda, use the following
213
213
 
214
214
  *Note*: The descriptions use the npm package parameters, but they also apply to PyPI and Go package parameters.
215
215
 
216
- | npm package parameter | PyPI package parameter | Description |
217
- | ---------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
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. |
225
- | `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
- | `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). |
229
- | `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
- | `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. |
232
- | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
233
- | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
234
- | `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
- | `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
- | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
237
- | `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. |
242
- | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
243
- | `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
- | `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. |
245
- | `enableProfiling` | `enable_profiling` | Enable the Datadog Continuous Profiler with `true`. Supported in Beta for Node.js and Python. Defaults to `false`. |
246
- | `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`. |
247
- | `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`. |
248
- | `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. |
249
- | `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`. |
216
+ | npm package parameter | PyPI package parameter | Description |
217
+ | ---------------------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
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). **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. |
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. |
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`). |
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). |
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. |
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**. |
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. |
237
+ | `enableDatadogTracing` | `enable_datadog_tracing` | Enable Datadog tracing on your Lambda functions. Defaults to `true`. |
238
+ | `enableMergeXrayTraces` | `enable_merge_xray_traces` | Enable merging X-Ray traces on your Lambda functions. Defaults to `false`. |
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. |
240
+ | `enableDatadogASM` | `enable_datadog_asm` | Enable [Datadog Application Security Management (ASM)](https://docs.datadoghq.com/security/application_security/) on the Lambda function. Requires the Datadog extension to be present (using `extensionLayerVersion` or `extensionLayerArn`) and `enableDatadogTracing`. Defaults to `false`. |
241
+ | `captureLambdaPayload` | `capture_lambda_payload` | [Captures incoming and outgoing AWS Lambda payloads](https://www.datadoghq.com/blog/troubleshoot-lambda-function-request-response-payloads/) in the Datadog APM spans for Lambda invocations. Defaults to `false`. |
242
+ | `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`. |
243
+ | `injectLogContext` | `inject_log_context` | When set, the Lambda layer will automatically patch console.log with Datadog's tracing ids. Defaults to `true`. |
244
+ | `logLevel` | `log_level` | When set to `debug`, the Datadog Lambda Library and Extension will log additional information to help troubleshoot issues. |
245
+ | `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. |
246
+ | `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. |
247
+ | `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. |
248
+ | `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. |
249
+ | `enableColdStartTracing` | `enable_cold_start_tracing` | Set to `false` to disable Cold Start Tracing. Used in Node.js and Python. Defaults to `true`. |
250
+ | `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`. |
251
+ | `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. |
252
+ | `enableProfiling` | `enable_profiling` | Enable the Datadog Continuous Profiler with `true`. Supported in Beta for Node.js and Python. Defaults to `false`. |
253
+ | `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`. |
254
+ | `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`. |
255
+ | `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. |
256
+ | `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`. |
257
+ | `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`. |
250
258
 
251
259
  **Note**: Using the parameters above may override corresponding function level `DD_XXX` environment variables.
252
260
 
@@ -258,7 +266,7 @@ Enable X-Ray Tracing on your Lambda functions. For more information, see [CDK do
258
266
  import * as lambda from "aws-cdk-lib/aws-lambda";
259
267
 
260
268
  const lambda_function = new lambda.Function(this, "HelloHandler", {
261
- runtime: lambda.Runtime.NODEJS_14_X,
269
+ runtime: lambda.Runtime.NODEJS_18_X,
262
270
  code: lambda.Code.fromAsset("lambda"),
263
271
  handler: "hello.handler",
264
272
  tracing: lambda.Tracing.ACTIVE,
@@ -508,7 +516,7 @@ Example stack: [step-functions-go-stack](https://github.com/DataDog/datadog-cdk-
508
516
 
509
517
  ```
510
518
  import (
511
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
519
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
512
520
  "github.com/aws/aws-cdk-go/awscdk/v2"
513
521
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
514
522
  )
@@ -535,7 +543,7 @@ To merge the Step Function's traces with downstream Lambda function or Step func
535
543
 
536
544
  ```
537
545
  import (
538
- "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
546
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
539
547
  "github.com/aws/aws-cdk-go/awscdk/v2/awslambda"
540
548
  sfn "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions"
541
549
  sfntasks "github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctionstasks"
@@ -661,6 +669,17 @@ In February 2025, Datadog released a major version update from `1.x.x` to `2.x.x
661
669
  2. `DatadogProps` -> `DatadogLambdaProps`
662
670
  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
671
  2. Upgrade Node.js version to `18.18.0` or above.
672
+ 3. For Go, change the import from:
673
+
674
+ ```
675
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct"
676
+ ```
677
+
678
+ to:
679
+
680
+ ```
681
+ "github.com/DataDog/datadog-cdk-constructs-go/ddcdkconstruct/v2"
682
+ ```
664
683
 
665
684
  ## Opening Issues
666
685
 
@@ -1,9 +1,9 @@
1
1
  [build-system]
2
- requires = ["setuptools~=70.0.0", "wheel~=0.42"]
2
+ requires = ["setuptools~=75.3.2", "wheel~=0.42"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [tool.pyright]
6
6
  defineConstant = { DEBUG = true }
7
- pythonVersion = "3.8"
7
+ pythonVersion = "3.9"
8
8
  pythonPlatform = "All"
9
9
  reportSelfClsParameterName = false
@@ -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.3.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,17 +26,17 @@ 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.3.0.jsii.tgz"
30
30
  ],
31
31
  "datadog_cdk_constructs_v2": [
32
32
  "py.typed"
33
33
  ]
34
34
  },
35
- "python_requires": "~=3.8",
35
+ "python_requires": "~=3.9",
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.111.0, <2.0.0",
40
40
  "publication>=0.0.3",
41
41
  "typeguard>=2.13.3,<4.3.0"
42
42
  ],
@@ -45,7 +45,6 @@ kwargs = json.loads(
45
45
  "Operating System :: OS Independent",
46
46
  "Programming Language :: JavaScript",
47
47
  "Programming Language :: Python :: 3 :: Only",
48
- "Programming Language :: Python :: 3.8",
49
48
  "Programming Language :: Python :: 3.9",
50
49
  "Programming Language :: Python :: 3.10",
51
50
  "Programming Language :: Python :: 3.11",