Sigma Trail is the component where you can view your application logs. In sigma, we have categorized logs into two types.
Test logs are the type, that will be generated in realtime when you execute a test case within the IDE. These logs will include the result/response of the test execution and the generated logs in line.
Prod logs are the type, that will be generated when you invoke the lambda function through one of your event sources. (ie: Api Gateway, S3 event etc.) These logs does not include the result/response of the execution.
We refer log request as the group of log lines which are generated during a one cycle of execution of lambda function.
Log request header gives you a quick insight about the Log Request. The format of the header is as follows.
[Date] [Time] [Request Id] [No of log lines] [TEST / PROD]
You can click on Log request header to expand or collapse the log lines.
This section is only applicable for TEST logs. If the result can be parsed to a JSON, Sigma will show you the response in an expandable JSON tree.
Log line is a single line of a console log generated by lambda code
Stack trace is a report of the active stack frames at the time of an error is thrown. This will be useful when debugging an application.
This section indicates the time taken to execute the function logic and the memory utilized to process the respective request.
Sigma trail header has following controls to fine tune your logs view.
Sigma Trail shows only trails related to one particular function within one screen. If you want to switch sigma trail to show trails of a different function, click on this button to get a list of available lambda functions.
In addition to this selector, switching between editor tabs will automtically switch Sigma Trail to show logs of the focused function.
Sigma allows you to download logs in following two formats.
If you are not interested about the visible logs, you can hide visible logs by this button.
Sigma automatically scrolls the trail for you. Whenever a new Log request is appended, trail will get automatically scrolled and expand the new log request. You may switch on/off this feature by toggling this button.
You can filter Sigma trails by using Cloudwatch filter pattern and syntax.
This will give you an effect similar to tailing with grep.
Close the sigma trail panel.
If you want to make more room for your code, you may resize sigma trail by holding and dragging the header as below.
Sigma by default shows you only the latest 15 log requests.
To view older logs, you may use following controllers.
This will load 15 more older logs to sigma trail.
This button will take you back to the 15 latest logs only mode.
By default Sigma continuously polls for new logs from Cloudwatch. If you wish to control this behaviour, you may use following set of buttons.
Turning of Real-time logs will stop Sigma from automatically polling for new logs.
In non Real-time mode, use this button to request for newer log requests.
Sigma is using Cloudwatch to generate the Sigma trail. Even though Test logs will appear immediately after execution, Production logs will take up to 30 seconds to appear in the Sigma Trail, due to the delay at Cloudwatch.