Skip to content

Collecting Insights

The Insight Collector service collects and publishes various reports for each launched workflow. Sometimes, you may need to configure them.

Currently, you can configure the execution log depth for all workflows or for a specific workflow respectively via the Insight Collector configuration file or the workflow labels.

Insight Collector Configuration File

Insight Collector configuration file is a YAML file with the mandatory insights section, that contains at least one entity. Each entity has mandatory name, kind and spec properties. spec property must contain at least one item.

Currently, the only entity kind supported is ExecutionLog and the user may configure only one execution log entity that must be named executionlog.

The example belove provides an illustration of this implementation. All execution log properties are set to 0 to ensure that the produced execution logs have the maximum possible depth:

insights:
  - name: executionlog
    kind: ExecutionLog
    spec:
      step-depth: 0
      job-depth: 0
      max-command-length: 0

To apply your execution log configuration, you need to pass the configuration file path to the variable INSIGHTCOLLECTOR_CONFIGURATION when lauchning the orchestrator or the Insight Collector service.

Workflow Labels

If you want to specify the execution log detail level for a single workflow, you must add some execution log specific labels under the metadata.labels section of this workflow. The following labels are recognized:

Label Value Required
executionlog/step-depth Step display depth No
executionlog/job-depth Job display depth No
executionlog/max-command-length Run commands display length in characters No

executionlog/step-depth defines the step display depth for the execution logs of the workflow. If this value is set to 0, all steps are displayed, if it is set to 1, only the steps of the first level are displayed and the nested steps are hidden, if it is set to 2, the steps produced by providers are also displayed.

executionlog/job-depth defines the job display depth for the execution logs of the workflow. If this value is set to 0, all jobs are displayed, if it is set to 1, only the jobs of the first level are displayed and the nested jobs are hidden, if it is set to 2, the jobs produced by generators are also displayed.

executionlog/max-command-length sets the maximum display length of run commands, measured in characters. 0 displays full commands, while any positive integer specifies a maximum length.

Info

The values set at the workflow level overwrite the values set in the service configuration file. If a workflow contains no execution log related labels and the service configuration file is not specified, the execution log parameters default to the following values: step-depth=1, job-depth=1, max-command-length=15.

Example

The following workflow contains all executionlog/... labels which are set to 0:

metadata:
  name: Robot test
  labels:
    executionlog/step-depth: '0'
    executionlog/job-depth: '0'
    executionlog/max-command-length: '0'
jobs:
 robot-execute-test:
    runs-on: [robotframework, linux]
    steps:
    - uses: robotframework/execute@v1
      with:
        test: robotframework/test_chars.robot
      working-directory: /home/user/directory

Warning

Workflow label values must be strings (and not integers): the numerical values must thus be quoted.

It will produce the following execution log, where all the steps are shown and all commands are displayed at the full length:

[...]
[timestamp][job uuid] Running function robotframeworkexecutev1 
[timestamp][job uuid]  Running function actionsdelete-filev1 
[timestamp][job uuid]   Running command: rm -f log.html
[timestamp][job uuid]  Running command: robot $ROBOTFRAMEWORK_EXTRA_OPTIONS 
--nostatusrc --listener "allure_robotframework;." "robotframework/test_chars.robot"
[...]
[timestamp][job uuid]  Running function actionscreate-archivev1 
[timestamp][job uuid]   Running command: rm -f RobotFramework_reports.tar
[timestamp][job uuid]   Running command: rm -f tmp_tar_files
[timestamp][job uuid]   Running command: rm -f intentionally_empty_archive
[timestamp][job uuid]   Running command: rm -f list_tar_files
[timestamp][job uuid]   Running command: touch list_tar_files
[...]