Define an internal event with analytics instrumentation group

Model the event first that includes all the data-points documented in Iteration 1 - New metrics for SAST adoption (&16661) • Unassigned • On track.

We should chime-in the subject matter experts from the Analytics Instrumentation Group in this design process because they know the whole process end2end and can help us in the event modelling process.

Internal event structure

Below is the even structure we came up with in this issue:

"observability": {
  "events": [
    {
      "event": "collect_sast_scan_metrics_from_pipeline",
      "property": "<scan_uuid>",
      "label": "(glas|semgrep)",
      "value": "<analyzer exit status>",
      "version": "<scaner version>",
      "exit_code": "<analyzer exit code>",
      "override_count": "<number of overrides>",
      "passthrough_count": "<number of passthroughs>",
      "custom_exclude_path_count": "<excluded paths>",
      "time_s": "<scan time seconds>",
      "file_count": "<number of scanned files>"
    }
  ]
}

Event Definition

---
description: The event tracks SAST metrics
internal_events: true
action: collect_sast_scan_metrics_from_pipeline
identifiers:
- project
- namespace
- user
product_group: static_analysis
product_categories:
- vulnerability_management
milestone: '17.11'
introduced_by_url: 'https://gitlab.com/gitlab-org/gitlab/-/merge_requests/186116'
tiers:
- free
- premium
- ultimate
additional_properties:
  label:
    description: "name of the analyzers"
  property:
    description: "a UUID that uniqueli identifies the scan"
  value:
    description: "exit status of the analyer where 0 indicates success and 1 indicates error"
  version:
    description: "version of the analyzer"
  exit_code:
    description: "exit code of the analyer"
  override_count:
    description: "number of configured overrides"
  passthrough_count:
    description: "number of configured passthroughs"
  custom_exclude_path_count:
    description: "captures whether or not users configured custom exclude paths"
  time_s:
    description: "scan time duration in seconds"
  file_count:
    description: "project size in terms of number of files"
Edited by Julian Thome