Skip to content

Commit a11f227

Browse files
committed
lint format
1 parent 3da715a commit a11f227

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ To further configure your plugin, use the following custom parameters in your `s
3030
| `site` | Set which Datadog site to send data to, such as `datadoghq.com` (default), `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, `ap1.datadoghq.com`, `ap2.datadoghq.com`, or `ddog-gov.com`. This parameter is required when collecting telemetry using the Datadog Lambda Extension. |
3131
| `apiKey` | [Datadog API key][7]. This parameter is required when collecting telemetry using the Datadog Lambda Extension. Alternatively, you can also set the `DATADOG_API_KEY` environment variable in your deployment environment. |
3232
| `appKey` | Datadog app key. Only needed when the `monitors` field is defined. Alternatively, you can also set the `DATADOG_APP_KEY` environment variable in your deployment environment. |
33-
| `apiKeySecretArn` | An alternative to using the `apiKey` field. The ARN of the secret that is storing the Datadog API key in AWS Secrets Manager. Remember to add the `secretsmanager:GetSecretValue` permission to the Lambda execution role. Note: Not supported for Node.js runtimes when using synchronous metrics (when `addExtension` and `flushMetricsToLogs` are both `false`). |
34-
| `apiKeySsmArn` | An alternative to using the `apiKey` field. The ARN of the parameter that is storing the Datadog API key in AWS Systems Manager Parameter Store. Remember to add the `ssm:GetParameter` permission to the Lambda execution role. |
33+
| `apiKeySecretArn` | An alternative to using the `apiKey` field. The ARN of the secret that is storing the Datadog API key in AWS Secrets Manager. Remember to add the `secretsmanager:GetSecretValue` permission to the Lambda execution role. |
34+
| `apiKeySsmArn` | An alternative to using the `apiKey` field. The ARN of the parameter that is storing the Datadog API key in AWS Systems Manager Parameter Store. Remember to add the `ssm:GetParameter` and `kms:Decrypt` (for encrypted SecureString parameters) permission to the Lambda execution role. |
3535
| `apiKMSKey` | An alternative to using the `apiKey` field. Datadog API key encrypted using KMS. Remember to add the `kms:Decrypt` permission to the Lambda execution role. |
3636
| `env` | When set along with `addExtension`, a `DD_ENV` environment variable is added to all Lambda functions with the provided value. Otherwise, an `env` tag is added to all Lambda functions with the provided value. Defaults to the `stage` value of the serverless deployment. |
3737
| `service` | When set along with `addExtension`, a `DD_SERVICE` environment variable is added to all Lambda functions with the provided value. Otherwise, a `service` tag is added to all Lambda functions with the provided value. Defaults to the `service` value of the serverless project.
@@ -78,7 +78,7 @@ To use any of these parameters, add a `custom` > `datadog` section to your `serv
7878
```yaml
7979
custom:
8080
datadog:
81-
apiKeySecretArn: "{Datadog_API_Key_Secret_ARN}"
81+
apiKeySecretArn: "{Datadog_API_Key_Secret_ARN}" # or use apiKeySsmArn for AWS Systems Manager Parameter Store
8282
enableXrayTracing: false
8383
enableDDTracing: true
8484
enableDDLogs: true

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,9 @@ function validateConfiguration(config: Configuration): void {
657657
}
658658

659659
function checkForMultipleApiKeys(config: Configuration): void {
660-
const definedKeys = ['apiKey', 'apiKMSKey', 'apiKeySecretArn', 'apiKeySsmArn'].filter((key) => key in config).map((key) => `\`${key}\``);
660+
const definedKeys = ["apiKey", "apiKMSKey", "apiKeySecretArn", "apiKeySsmArn"]
661+
.filter((key) => key in config)
662+
.map((key) => `\`${key}\``);
661663

662664
if (definedKeys.length > 1) {
663665
let message;

0 commit comments

Comments
 (0)