Troubleshoot the Splunk OpenTelemetry Lambda layer π
If your instrumented AWS Lambda function is not sending data to Splunk Observability Cloud, or data is missing, follow these steps to identify and resolve the issue.
No data appears in Splunk Observability Cloud π
If no data from your instrumented AWS Lambda function appears in Splunk Observability Cloud, try the following steps:
Check the CloudWatch metrics of your AWS Lambda Function. Make sure the Lambda function is responding to invocations. You can also check for errors.
Make sure that you specified the
SPLUNK_REALM
andSPLUNK_ACCESS_TOKEN
environment variables. See Configure the Splunk OpenTelemetry Lambda layer.Try increasing the value of the
OTEL_INSTRUMENTATION_AWS_LAMBDA_FLUSH_TIMEOUT
environment variable if the back end or network is slow.Activate verbose logging of the extension. See Activate debug logging.
No data points or metrics in Splunk Observability Cloud π
If no metric data from your instrumented AWS Lambda function appears in Splunk Observability Cloud, try the following steps:
Check the CloudWatch metrics of your AWS Lambda Function. Make sure the Lambda function is responding to invocations. You can also check for errors.
Make sure that you specified the
SPLUNK_REALM
andSPLUNK_ACCESS_TOKEN
environment variables. See Configure the Splunk OpenTelemetry Lambda layer.The extension might be sending data points with significant delay due to buffering mode. See Metrics configuration.
Activate verbose logging of the extension. See Activate debug logging.
Error about SPLUNK_ACCESS_TOKEN and SPLUNK_REALM π
If the following error appears, you must set the value of the SPLUNK_ACCESS_TOKEN
environment variable:
[ERROR] SPLUNK_REALM is set, but SPLUNK_ACCESS_TOKEN is not set. To export data to Splunk Observability Cloud, define a Splunk Access Token.
For more information, see General settings.
Error about exporter endpoint and SPLUNK_REALM π
If the following error appears, you must either set the value of the SPLUNK_REALM
and SPLUNK_ACCESS_TOKEN
environment variables, or define an exporter endpoint:
[ERROR] Exporter endpoint must be set when SPLUNK_REALM is not set. To export data, either set a realm and access token or a custom exporter endpoint.
For instructions on how to define a custom exporter endpoint, see Exporters configuration.
Deactivate instrumentations that load automatically π
Some of the wrappers included in the Splunk OpenTelemetry Lambda layer load instrumentations for popular libraries or frameworks automatically. To deactivate instrumentations that load automatically, follow these steps:
Enter the instrumentations you want to deactivate as comma-separated values for the OTEL_PYTHON_DISABLED_INSTRUMENTATIONS
environment variable. For a list of automatically loaded instrumentations, see the requirements list in the OpenTelemetry repository on GitHub: https://github.com/open-telemetry/opentelemetry-lambda/blob/main/python/src/otel/otel_sdk/nodeps-requirements.txt.
Activate debug logging π
If trace data for your function still doesnβt appear in Splunk Observability Cloud, activate logging to collect debugging information:
Set the
OTEL_LAMBDA_LOG_LEVEL
environment variable toDEBUG
for your instrumented function.Check AWS CloudWatch for spans.
Search for specific spans in the back end.
For metric data, follow these steps:
Set the
VERBOSE
environment variable totrue
.Set the
HTTP_TRACING
environment variable totrue
.Search for relevant log messages in AWS CloudWatch.
Serverless Framework support π
Some features of the Serverless Framework might impact OpenTelemetry tracing of Python Lambda functions.
Python libraries compression π
The zip
feature of pythonRequirements
allows packing and deploying Lambda dependencies as compressed files. To instrument packages compressed using the Serverless Framework, set the SPLUNK_LAMBDA_SLS_ZIP
environment variable to true
. For more information, see https://github.com/serverless/serverless-python-requirements#dealing-with-lambdas-size-limitations on GitHub.
Slim feature π
The Slim feature reduces the size of Lambda packages by removing some files, including dist-info
folders. Some of the files removed by the Slim feature are required by the OpenTelemetry Python autoinstrumentation. Deactivate the slim
option in your serverless.yml file or define custom slimPatterns
. For more information, see https://github.com/serverless/serverless-python-requirements#slim-package on GitHub.