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: README.md
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,22 @@ Once [installed](#installation), you should be able to view enhanced metrics for
36
36
37
37
Check out the official documentation on [Datadog Lambda enhanced metrics](https://docs.datadoghq.com/integrations/amazon_lambda/?tab=python#real-time-enhanced-lambda-metrics).
38
38
39
+
## Advanced Configurations
40
+
41
+
### Handler Wrapper
42
+
43
+
In order to instrument individual invocations, the Datadog Lambda library needs to wrap around your Lambda handler function. This is usually achieved by setting your function's handler to the Datadog handler function (`datadog_lambda.handler.handler`) and setting the environment variable `DD_LAMBDA_HANDLER` with your original handler function to be called by the Datadog handler.
44
+
45
+
If this method doesn't work for you, instead of setting the handler and the `DD_LAMBDA_HANDLER` environment variable, you can apply the Datadog Lambda library wrapper in your function code like below:
46
+
47
+
```python
48
+
from datadog_lambda.wrapper import datadog_lambda_wrapper
0 commit comments