You can verify a successful Dynatrace integration with AWS Lambda through the following indicators:
If any issues arise with the Dynatrace AWS Lambda layers, start by examining the logs and error messages for troubleshooting insights.
This feature is necessary for maintaining trace continuity when using the Dynatrace AWS Lambda extension, as it allows the Dynatrace OneAgent to inject its trace context into outgoing requests. Without this feature, traces initiated by Dynatrace may break, as the trace context would not be forwarded properly.
To activate the Forward Tag 4 trace context extension feature, go to Settings > Preferences > OneAgent features.
You can check for specific log entries to verify that the AWS Lambda integration is successful.
Enable general log output:
DT_LOGLEVELCON: info
Enable HTTP exporter logs:
DT_DEBUGFLAGS: debugHttpNative=true
Check for a log line like:
[native] [cURL/bc09328b] < HTTP/1.1 202 Accepted
Response code | Description | How to troubleshoot |
---|---|---|
202 Accepted | The expected response of an ActiveGate, indicates successful export | No action needed; export was successful |
200 OK | The response came from an endpoint that is not an ActiveGate, likely no traces are visible | Review the DT_CONNECTION_BASE_URL |
404 Not Found | Endpoint not found, likely no traces are visible | Review DT_CONNECTION_BASE_URL |
401 Unauthorized | Token rejected, likely no traces are visible | Review DT_TENANT , DT_CONNECTION_AUTH_TOKEN , DT_CONNECTION_BASE_URL |
If other troubleshooting methods don't resolve your issue, you can enable debug logging of the log collector.
Enabling debug logging should only be used temporarily, as it will generate a large amount of logs in CloudWatch, which may impact the function's performance.
In your Lambda function's configuration, set the following values:
If you are using environment variables:
Environment variable | Value |
---|---|
DT_LOG_COLLECTION_LOG_LEVEL | debug |
DT_LOGGING_DESTINATION | stdout |
If you are using dtconfig.json
configuration, you can enable debug logging by setting the LogCollection.LogLevel
and Logging.Destination
properties:
{...other values..."Logging": {"Destination": "stdout"},"LogCollection": {...other values..."LogLevel": "debug"}}
The log collector will then print debug logs to the Lambda function's log stream. You can view these logs in the CloudWatch console. Note that the collector will not send its own logs to Dynatrace.