From 583ab93b1f35a8f8aa8def6fa583976eef07f6bb Mon Sep 17 00:00:00 2001 From: Jean-Louis Voiseux <48380853+jlvoiseux@users.noreply.github.com> Date: Tue, 12 Apr 2022 17:26:48 +0200 Subject: [PATCH] Make Secret token / API Key optional --- apm-lambda-extension/extension/process_env.go | 4 ++-- docs/monitoring-aws-lambda.asciidoc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apm-lambda-extension/extension/process_env.go b/apm-lambda-extension/extension/process_env.go index a8902b9a..fe0b2d75 100644 --- a/apm-lambda-extension/extension/process_env.go +++ b/apm-lambda-extension/extension/process_env.go @@ -111,10 +111,10 @@ func ProcessEnv() *extensionConfig { config.dataReceiverServerPort = ":8200" } if config.apmServerUrl == "" { - Log.Fatalln("please set ELASTIC_APM_LAMBDA_APM_SERVER, exiting") + Log.Fatal("please set ELASTIC_APM_LAMBDA_APM_SERVER, exiting") } if config.apmServerSecretToken == "" && config.apmServerApiKey == "" { - Log.Fatalln("please set ELASTIC_APM_SECRET_TOKEN or ELASTIC_APM_API_KEY, exiting") + Log.Warn("ELASTIC_APM_SECRET_TOKEN or ELASTIC_APM_API_KEY not specified") } return config diff --git a/docs/monitoring-aws-lambda.asciidoc b/docs/monitoring-aws-lambda.asciidoc index 74d33111..9dbcdcd4 100644 --- a/docs/monitoring-aws-lambda.asciidoc +++ b/docs/monitoring-aws-lambda.asciidoc @@ -46,7 +46,7 @@ The following configuration options are particularly relevant for Elastic's APM This required config option controls where the Lambda extension will ship data. This should be the URL of the final APM Server destination for your telemetry. === `ELASTIC_APM_SECRET_TOKEN` or `ELASTIC_APM_API_KEY` -One of these needs to be set as the authentication method that the extension uses when sending data to the URL configured via `ELASTIC_APM_LAMBDA_APM_SERVER`. +One of these needs to be set as the authentication method that the extension uses when sending data to the URL configured via `ELASTIC_APM_LAMBDA_APM_SERVER`. Sending data to the APM Server if none of these options is set is possible, but your APM agent must be allowed to send data to your APM server in https://www.elastic.co/guide/en/apm/guide/current/configuration-anonymous.html[anonymous mode]. === `ELASTIC_APM_SERVICE_NAME` The configured name of your application or service. The APM Agent will use this value when reporting data to the APM Server. If unset, the APM Agent will automatically set the value based on the Lambda function name. Use this config option if you want to group multiple Lambda functions under a single service entity in APM.