Within Serverless Console all the observability details about your apps and services are captured as Traces. All Traces have a unique identifier, some optional metrics and tags, as well as an array of spans. This structure allows us to offer rich filtering controls, and sequence diagrams.
To do this we provided a set of tools for analyzing Traces
Similar to our Metrics View the Trace Explorer provides you a starting point for discovering errors, or slowness across your Organization. Similar to metrics views you can apply filters to narrow in on errors, slowness or usage patterns across your organization.
Traces share the same set of filters from our Metrics View but are not saved.
Filtering allows you to narrow in on particular behavior and time frame for to isolate invocations. You can filter on.
- Failures - sorting by failures will show you Lambda functions that failed to execute successfully (does not require tracing to be enabled).
- Errors - sorting by errors allows you to surface errors you have captured (requires tracing be enabled)
- Namespace and environment - Namespaces and environments give you the ability to filter for distinct collection of functions.
- AWS Accounts - Names/numbers of any AWS Accounts that are sending Log or Trace data to console.
- Function Names - Functions that are sending Log or Trace data to console.
- Regions - Regions that are sending Log or Trace data to console.
Even when Traces are not enabled we generate traces from logs based on Logs for each Lambda invocation. This means you can use the Trace Explorer without enabling traces to find older invocations.
A Trace allows you to understand the overall lifecycle, interactions, and timing of your Lambda function along with it's Logs and Metrics.
A Trace contains a set of Spans associated with and displayed in the style of a Gant Chart. This chart provides you with context for when, and how long various subsequent interactions took.
The following spans related to AWS Lambda execution environment.
- Initialization This will appear under the span
aws.lambda.initializationand will contain details about cold starts.
- Invocation This will contain details about the execution of your function.
- Request Id - This is a unique id used on your trace. It is used to associate logs and metrics for a Trace.
- Arch - This is the architecture (x86_64 or ARM64) that executed the function.
- Max Memory - This is the Max Memory in MB used by your function.
- Version - This is the version of the function that executed.
- Outcome -
- Log Group - This is the Log Group where you can find logs for this function.
- Log Stream Name - This is the Log Stream we used to collect logs for this function.