|
| 1 | +# datadog-lambda-extension |
| 2 | +[](https://circleci.com/gh/DataDog/datadog-agent/tree/master) |
| 3 | +[](https://chat.datadoghq.com/) |
| 4 | +[](https://github.com/DataDog/datadog-agent/blob/master/LICENSE) |
| 5 | + |
| 6 | +AWS Lambda Extension that supports submitting custom metrics, traces and logs synchronously while your AWS Lambda function executes. |
| 7 | + |
| 8 | +## Installation |
| 9 | + |
| 10 | +Follow the [installation instructions](https://docs.datadoghq.com/serverless/datadog_lambda_library/extension/), and view your function's enhanced metrics, traces and logs in Datadog. |
| 11 | + |
| 12 | +## Environment Variables |
| 13 | + |
| 14 | +### DD_API_KEY |
| 15 | + |
| 16 | +The Datadog API Key must be defined by setting one of the following environment variables: |
| 17 | + |
| 18 | +- DD_API_KEY - the Datadog API Key in plain-text, NOT recommended |
| 19 | +- DD_KMS_API_KEY - the KMS-encrypted API Key, requires the `kms:Decrypt` permission |
| 20 | + |
| 21 | +### DD_SITE |
| 22 | + |
| 23 | +Possible values are `datadoghq.com`, `datadoghq.eu`, `us3.datadoghq.com` and `ddog-gov.com`. The default is `datadoghq.com`. |
| 24 | + |
| 25 | +### DD_LOG_LEVEL |
| 26 | + |
| 27 | +Set to `debug` enable debug logs from the Datadog Lambda Extension. Defaults to `info`. |
| 28 | + |
| 29 | +## Configuration file |
| 30 | + |
| 31 | +Using a configuration file is supported (note that environment variable settings |
| 32 | +override the value from the configuration file): you only have to create a [`datadog.yaml`](https://docs.datadoghq.com/agent/guide/agent-configuration-files/?tab=agentv6v7) |
| 33 | +file in the root of your lambda function. |
| 34 | + |
| 35 | +### Logs filtering and scrubbing support |
| 36 | + |
| 37 | +The Datadog Lambda Extension supports using the different logs filtering / scrubbing features of the Datadog Agent. All you have to do is to set `processing_rules` in the `logs_config` |
| 38 | +field of your configuration. |
| 39 | + |
| 40 | +Please refer to the public documentation for all filtering and scrubbing features: |
| 41 | + |
| 42 | +* https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#global-processing-rules |
| 43 | +* https://docs.datadoghq.com/agent/logs/advanced_log_collection/?tab=configurationfile#filter-logs |
| 44 | + |
| 45 | +## Opening Issues |
| 46 | + |
| 47 | +If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates. |
| 48 | + |
| 49 | +When opening an issue, include the Datadog Lambda Layer version, and stack trace if available. In addition, include the steps to reproduce when appropriate. |
| 50 | + |
| 51 | +You can also open an issue for a feature request. |
| 52 | + |
| 53 | + |
| 54 | +## Contributing |
| 55 | + |
| 56 | +If you find an issue with this package and have a fix, please feel free to open a pull request following the [procedures](https://github.com/DataDog/datadog-agent/blob/master/docs/dev/contributing.md). |
| 57 | + |
| 58 | +## Community |
| 59 | + |
| 60 | +For product feedback and questions, join the `#serverless` channel in the [Datadog community on Slack](https://chat.datadoghq.com/). |
| 61 | + |
| 62 | +## License |
| 63 | + |
| 64 | +Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. |
| 65 | + |
| 66 | +This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc. |
0 commit comments