Skip to content

Migrate DS analyzer on using events registry

What does this MR do and why?

o11y events were stored directly in the DS analyzer code. We decided to centralise all event definitions and constructors in a common events registry.

In this MR we migrate the DS analyzer to use the definitions that can be found in the event registry rather than declaring them there.

Related issues

Create CA events registry package (gitlab-org/gitlab#572498 - closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Testing

The dependency scanning report is not exposed through the DS component. In order to see the report I pushed a commit, which then I dropped, that prints the gl-dependency-scanning-report.json. You can find the job here.

"observability": {
      "events": [
        {
          "event": "collect_ds_analyzer_scan_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "label": "0.44.2",
          "value": 4
        },
        {
          "event": "collect_ds_analyzer_scan_duration_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "value": 5
        },
        {
          "event": "collect_ds_analyzer_scan_static_reachability_duration_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "value": 0
        },
        {
          "event": "collect_ds_analyzer_scan_sbom_duration_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "value": 0
        },
        {
          "event": "collect_ds_analyzer_scan_security_report_duration_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "value": 5
        },
        {
          "event": "collect_ds_analyzer_scan_sbom_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "label": "gem",
          "value": 36,
          "input_file_path": "Gemfile.lock"
        },
        {
          "event": "collect_ds_analyzer_scan_sbom_metrics_from_pipeline",
          "property": "e5e4f61c-03f3-4954-bfbe-fea696bc0eb7",
          "label": "golang",
          "value": 54,
          "input_file_path": "go.mod"
        }
      ]
    }
Edited by Nick Ilieskou

Merge request reports

Loading