Skip to content

Commit ab1dfe3

Browse files
jchrostek-ddclaude
andcommitted
feat(integration-tests): make tracer layer ARNs configurable via env vars
Allow passing custom tracer library versions via environment variables (NODE_TRACER_LAYER_ARN, PYTHON_TRACER_LAYER_ARN, JAVA_TRACER_LAYER_ARN, DOTNET_TRACER_LAYER_ARN) while preserving current values as defaults. This enables testing against custom tracer builds without code changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d906255 commit ab1dfe3

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

integration-tests/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,26 @@ export DATADOG_API_SECRET_ARN="arn:aws:secretsmanager:us-east-1:ACCOUNT_ID:secre
4444

4545
**Docker**: Required for building Lambda functions.
4646

47+
### Configuration
48+
49+
#### Tracer Layer ARNs (Optional)
50+
51+
By default, integration tests use hardcoded Datadog tracer layers. To test with custom tracer versions, set these environment variables:
52+
53+
| Variable | Description | Default |
54+
|----------|-------------|---------|
55+
| `NODE_TRACER_LAYER_ARN` | Node.js tracer layer ARN | `arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node24-x:132` |
56+
| `PYTHON_TRACER_LAYER_ARN` | Python tracer layer ARN | `arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python313-ARM:117` |
57+
| `JAVA_TRACER_LAYER_ARN` | Java tracer layer ARN | `arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-java:25` |
58+
| `DOTNET_TRACER_LAYER_ARN` | .NET tracer layer ARN | `arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-dotnet-ARM:23` |
59+
60+
**Example:**
61+
```bash
62+
# Test with a custom Node.js tracer layer
63+
export NODE_TRACER_LAYER_ARN="arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node24-x:135"
64+
./scripts/local_deploy.sh base
65+
```
66+
4767
### Workflow
4868

4969
#### 1. Build and Publish Extension Layer

integration-tests/lib/util.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ export const defaultPythonRuntime = lambda.Runtime.PYTHON_3_13;
1414
export const defaultJavaRuntime = lambda.Runtime.JAVA_21;
1515
export const defaultDotnetRuntime = lambda.Runtime.DOTNET_8;
1616

17-
export const defaultNodeLayerArn = 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node24-x:132';
18-
export const defaultPythonLayerArn = 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python313-ARM:117';
19-
export const defaultJavaLayerArn = 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-java:25';
20-
export const defaultDotnetLayerArn = 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-dotnet-ARM:23';
17+
export const defaultNodeLayerArn = process.env.NODE_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node24-x:132';
18+
export const defaultPythonLayerArn = process.env.PYTHON_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python313-ARM:117';
19+
export const defaultJavaLayerArn = process.env.JAVA_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-java:25';
20+
export const defaultDotnetLayerArn = process.env.DOTNET_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-dotnet-ARM:23';
2121

2222
export const defaultDatadogEnvVariables = {
2323
DD_API_KEY_SECRET_ARN: datadogSecretArn,

0 commit comments

Comments
 (0)