Skip to content

Commit 2f667ea

Browse files
Merge pull request #62 from DataDog/darcy.rayner/v2.18.0
v2.18.0
2 parents d0f88d9 + 6fb7a0e commit 2f667ea

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ functions:
6666
DD_FLUSH_TO_LOG: true
6767
```
6868
69+
Alternatively, consider using [serverless-plugin-datadog](https://github.com/DataDog/serverless-plugin-datadog). The plugin can take care of adding lambda layers to your functions, and wrapping your handlers.
70+
6971
## Environment Variables
7072
7173
### DD_FLUSH_TO_LOG
@@ -106,8 +108,29 @@ Set to `debug` enable debug los from the Datadog Lambda Layer.
106108

107109
Generate enhanced Datadog Lambda integration metrics, such as, `aws.lambda.enhanced.invocations` and `aws.lambda.enhanced.errors`. Defaults to true.
108110

111+
### DD_LAMBDA_HANDLER
112+
113+
For use with the [redirected handler](#Redirected-Handler) method. Location of your original lambda handler.
114+
115+
### DD_TRACE_ENABLED
116+
117+
When used with the [redirected handler](#Redirected-Handler) method, will auto initialize the tracer when set to true.
118+
109119
## Basic Usage
110120

121+
Datadog needs to be able to read headers from the incoming Lambda event. To do this, you must wrap your handler function with our library. We provide some easy ways of wrapping your handlers.
122+
123+
### Redirected Handler
124+
125+
We provide a swap in replacement handler, with zero required code changes.
126+
127+
1. Set the environment variable `DD_LAMBDA_HANDLER` to your regular handler location, eg. `myfunc.handler`.
128+
2. Set your handler to `datadog_lambda.handler.handler`.
129+
130+
### Manual Wrap
131+
132+
You might find it more convenient to wrap your handlers manually.
133+
111134
```python
112135
import requests
113136
from datadog_lambda.wrapper import datadog_lambda_wrapper

datadog_lambda/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The minor version corresponds to the Lambda layer version.
22
# E.g.,, version 0.5.0 gets packaged into layer version 5.
3-
__version__ = "2.17.0"
3+
__version__ = "2.18.0"
44

55

66
import os

0 commit comments

Comments
 (0)