You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/instrumentation-aws-lambda/CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,15 @@
1
1
<!-- markdownlint-disable MD007 MD034 -->
2
2
# Changelog
3
3
4
+
## [Unreleased]
5
+
6
+
### Features
7
+
8
+
***instrumentation-aws-lambda:** Added runtime-aware handler support. The instrumentation automatically detects the Node.js runtime version from `AWS_EXECUTION_ENV` and adapts handler signatures accordingly:
9
+
***Node.js 24+**: Only Promise-based handlers are supported (callbacks deprecated by AWS Lambda)
10
+
***Node.js 22 and lower**: Both callback-based and Promise-based handlers are supported for backward compatibility
11
+
This ensures seamless operation across different Node.js runtime versions while respecting AWS Lambda's removal of callbacks in Node.js 24+.
- This package will instrument the lambda execution regardless of versions.
25
25
26
+
## Important Notes
27
+
28
+
### Handler Types Supported
29
+
30
+
This instrumentation automatically detects the Node.js runtime version and supports handlers accordingly:
31
+
32
+
-**Node.js 24+**: Only Promise-based handlers are supported (callbacks are deprecated by AWS Lambda)
33
+
-**Node.js 22 and lower**: Both callback-based and Promise-based handlers are supported for backward compatibility
34
+
35
+
The instrumentation detects the runtime version from the `AWS_EXECUTION_ENV` environment variable and adapts the handler signature accordingly. For Node.js 24+, the handler signature is `(event, context)`, while for Node.js 22 and lower, it supports both `(event, context, callback)` and `(event, context)`.
36
+
37
+
Example handlers:
38
+
39
+
```js
40
+
// Callback-based handler (Node.js 22 and lower only)
**Note**: AWS Lambda has removed callback-based handlers in Node.js 24 runtime. It's required to migrate to Promise-based handlers when upgrading to Node.js 24+.
52
+
26
53
## Usage
27
54
28
55
Create a file to initialize the instrumentation, such as `lambda-wrapper.js`.
0 commit comments