Collecting metrics for historical trends reports

Before you can build trends reports that show changes over time, you must configure and schedule Lifecycle Query Engine tasks to collect data.

About this task

You create, edit, and enable metric collection tasks on the Data metrics administration page at http://<host_name>:<port>/lqe/web/admin/metric-config.

When you run multiple historical metrics at the same time, the system queues and processes each metric tasks in sequence. This means that even if multiple metrics are triggered simultaneously, their tasks are handled one group at a time. This approach ensures consistent and reliable processing of metric data, avoiding conflicts or partial results.

A sample task is available on the Data metrics page. To modify this task, click the task name, and change the following settings:
  • You can change the task name.
  • You can edit the schedule to collect metrics at a different time.
  • Choose the streams that contain the versions of the artifacts you want historical metrics on.
  • Select what metrics to gather.

To run this task, click Run now.

To create a data collection task, follow the procedure.

Procedure

  1. Go to the Data metrics page at http://<host_name>:<port>/lqe/web/admin/metric-config. On the Lifecycle Query Engine Administration page, find Data metrics in the menu, under Query & report data.
  2. Optional: To optimize the performance of queries run by metric jobs in Lifecycle Query Engine, you can add query hints. Set the query hints by accessing the Lifecycle Query Engine Relational Store settings page at https://<server>:<port>/lqe/web/pgs/settings. Alternatively, you can go to the Relational Store settings link on the Lifecycle Query Engine Administration page.
    For example, to speed up the runtime of a query, use the following query hint: /*+ parallel(4) */. By default the hint is set to blank. Users must set the query hint only if the metric queries are slow.
  3. click New task, and enter the task name.
  4. Schedule the task.
    Click Edit to enable the task, and configure the date and time.
    Important: Collecting data can be resource-intensive. Schedule the task to run when the server isn’t heavily used.
    1. Select the checkbox to enable the task.
    2. Select the day and time. Then, click OK to save.
  5. Add the streams that contain the versions of the artifacts you want to collect metrics on.
    1. Click Add streams.
      If you don't add any stream, the task collects metrics from all data.
      Important: To avoid performance issues, choose only the streams that you want to focus on. If you collect historical metrics from all the data, you end up running resource-intensive data collection jobs for each stream.
    2. Select the required domain, project area, component, and streams. Then, click Add streams.
    Remember: Metric collection isn’t automatically enabled for new streams; you must add new streams to existing tasks.
    You can see that the new stream is added in the Selected streams section as Newly added stream.
  6. From the metrics table, choose what metrics to gather by selecting the Enable check box next to the metric.
    In the metric table, click any column header including Enable, Metrics, or Type, to sort the metrics in ascending or descending order. You can see the Latest Status column to determine whether a job is running or has completed. You can also see the duration of the most recent run, providing greater transparency into task performance.
  7. If you want the task to run as scheduled, click Save, or click Save > Run now.

What to do next

You can now create historical trends reports with Report Builder.

If team members choose an Lifecycle Query Engine-based data source and the Report Builder reports don’t show the artifacts that they expect, show artifacts more than one time, or show a different number of artifacts than application views, you can validate the TRS feeds for the application. See Validating TRS feeds and the LQE index.