The Coralogix AWS Lambda Telemetry Exporter supersedes the previously offered Coralogix Extension for AWS Lambda (version 1.x.y) by extending its capabilities beyond logs. If you are already using the Coralogix Extension for AWS Lambda you can stick with it for now or migrate to the Telemetry Exporter to enjoy the new goodies early. We recommend using the Telemetry Exporter in new deployments.
Note! Coralogix AWS Lambda Telemetry Exporter version 0.2.0 introduces changes in log structure. You may need to adjust your queries, filters or parsing rules to work with the new log structure.
New! Coralogix AWS Lambda Telemetry Exporter version 0.2.0 now sends metrics.
1. Sign up for a Coralogix account. Set up your account on the Coralogix domain corresponding to the region within which you would like your data stored.
2. Access your Coralogix private key.
3. Create an active AWS account with permissions to manage Lambda functions.
4. Choose at least one AWS Lambda function to monitor.
The Coralogix AWS Lambda Telemetry Exporter is available either by:
To deploy or update the Coralogix AWS Lambda Telemetry Exporter, select the ARN corresponding to your AWS region and CPU architecture:
arn:aws:lambda:ap-south-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-south-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:eu-north-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:eu-north-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:eu-west-3:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:eu-west-3:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:eu-west-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:eu-west-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:eu-west-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:eu-west-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ap-northeast-3:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-northeast-3:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ap-northeast-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-northeast-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ap-northeast-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-northeast-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ca-central-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ca-central-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:sa-east-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:sa-east-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ap-southeast-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-southeast-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:ap-southeast-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:ap-southeast-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:eu-central-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:eu-central-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:us-east-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:us-east-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:us-east-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:us-east-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:us-west-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:us-west-1:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5 arn:aws:lambda:us-west-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-x86_64:5 arn:aws:lambda:us-west-2:625240141681:layer:coralogix-aws-lambda-telemetry-exporter-arm64:5
STEP 1. Configure the coralogix-aws-lambda-telemetry-exporter
.
Note: Prior to version 0.3.0, variables began with the
CORALOGIX_
prefix. Version 0.3.0 accepts bothCX_
andCORALOGIX_
prefixes. We recommend using theCX_
prefix to reduce the size of environment variables, as AWS puts a 4kB limit on the total size of environment variables of a function.
LOW_OVERHEAD
, REPORT_AFTER_INVOCATION
and REPORT_DURING_AND_AFTER_INVOCATION
. For info on how to choose the optimal strategy for your Lambda function, see Reporting Strategies section below.LOW_OVERHEAD
> 10000REPORT_AFTER_INVOCATION
> 25REPORT_DURING_AND_AFTER_INVOCATION
> 2000true
. Set to false to disable metrics reporting.true
. Set to false to exclude the cx_metadata
from logs in order to reduce their size.4317
and 4318
ports.telemetry_api
. Acceptable values are:
telemetry_api
– will generate spans basing on data provided by the AWS Lambda Telemetry API. (before 0.3.0 this was the only way of tracing)otel
– will expect to receive spans from the function via OTLP. This mode is meant to be used in conjunction with OTEL instrumentation of the function and the CX_OTLP_SERVER_ENABLED enabled. Warning: otel
tracing mode delays emitting logs until the end of the invocation even when reporting strategy is set to REPORT_DURING_AND_AFTER_INVOCATION.all
. Acceptable values are:
all
– all traces are sent to coralogixfollow_xray
– the telemetry exporter will respect AWS XRay’s decision which traces should be sampledfalse
. Setting it to true
will enable enrichment of the telemetry with the tags of the Lambda function. See Enrichment with tags section to learn how to correctly set this up.STEP 2. Add the Telemetry Exporter layer to the chosen function.
coralogix-lambda-extension
, we suggest removing it: Layers > Edit > Select the Lambda layer > RemoveDue to the serverless nature of AWS Lambda and Lambda extensions, the telemetry-exporter
cannot freely do its job after and between invocations of the monitored Lambda function. A tradeoff has to be made between timely delivery of the telemetry and keeping overhead costs low.
The optimal strategy choice depends on how often the Lambda function is invoked and how long it runs. The coralogix-aws-lambda-telemetry-exporter
offers three reporting strategies that enable you to adjust reporting to the characteristics of your function.
LOW_OVERHEAD
: Recommended for frequently called functions. Telemetry is batched across many invocations of the function, and the telemetry-exporter
avoids keeping the Lambda execution environment active after an invocation is complete (and in turn avoids additional billable time to the invocations). This may result in long delays (in the order of minutes) in the delivery of telemetry.REPORT_AFTER_INVOCATION
: Recommended for rarely called functions with short to moderate execution times. Telemetry is reported at the end of each invocation, limiting the amount of billable time for each invocation.REPORT_DURING_AND_AFTER_INVOCATION
: Recommended for rarely called functions with long execution times (15s or more). Telemetry is reported in regular intervals during the execution of the function and then after the execution completes. This strategy will add 2-3s of billable time to each invocation.Note: Regardless of the chosen reporting strategy, technical limitations may place constraints on delivery times for some telemetry data. Rather than being delivered directly after invocation, some data (such as the total billable time of an invocation) is delivered during the next invocation of the Lambda function instance.
New! Coralogix AWS Lambda Telemetry Exporter version 0.2.0 now sends metrics. Check out our tutorial here.
New! Coralogix AWS Lambda Telemetry Exporter version 0.3.0 can read the tags of the AWS Lambda function and add them to all reported telemetry (logs/metrics/traces). This feature is disabled by default and can be enabled with CX_TAGS_ENABLED
, but it requires prior configuration of permissions for the Lambda function. The configuration can be done in the following steps:
JSON
view and paste the following policy JSON:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "lambda:ListTags", "Resource": "<paste lambda ARN here>" } ] }
<paste lambda ARN here>
with the ARN of the Lambda function. (you can find it on main page of the function’s configuration)ListLambdaTags
CX_TAGS_ENABLED
environment variable to true
The Coralogix AWS Lambda Telemetry Exporter can send telemetry to Coralogix over AWS Private Link by implementing the following steps:
STEP 1. Set up PrivateLink for your VPC.
STEP 2. Configure the lambda function to run in that VPC.
STEP 3. Change the CX_DOMAIN
environment variable, by adding private.
at the beginning. For example, if your CX_DOMAIN
used to be coralogix.com
, now it should appear as private.coralogix.com
.
Note! Coralogix AWS Lambda Telemetry Exporter version 0.2.0 introduces changes in log structure. You may need to adjust your queries, filters or parsing rules to work with the new log structure.
New! Coralogix AWS Lambda Telemetry Exporter version 0.3.0 reports response latency/duration as tags (attributes) of the invocation span instead of reporting it as independent spans. This change has been made to declutter the trace.
Coralogix AWS Lambda Telemetry Exporter version 0.2.0 now sends metrics. If you don’t wish to send metrics, you can use the CORALOGIX_LOG_METADATA_ENABLED variable documented above to disable them.
STEP 1. Look up the latest layer version
STEP 2. Change the Telemetry Exporter layer version used by the function.
STEP 1. Redeploy the Telemetry Exporter Lambda layer from the AWS Serverless Repository into your AWS account.
STEP 2. Change the Telemetry Exporter layer version used by the function.
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].