Skip to content

AI metrics via PG: Create a GraphQL API

Problem

Proposal

As part of #474469 (closed):

  • Create a GraphQL API (with pagination) for extracting the events.
group|project(full_path: FULL_PATH) {
  aiUsageData {
    codeSuggestionEvents {
      nodes { // Paginated
        language
        suggestionSize
        createdAt
      }
    }
  }
}

Tiering

  • This API should only be available for Duo Enterprise.

Release notes

Before 17.5, AI impact analytics were only available to Duo Enterprise customers on GitLab.com or with ClickHouse integrated into their self-managed instance. Additionally, the metrics provided by default were only available in aggregate form. This release allows you to export raw code suggestion events from the GraphQL API, enabling you to import the data into your data analysis tool to get deeper insights into acceptance rates across more dimensions, such as suggestion size, language, and user. The raw events are not stored in ClickHouse, which extends the availability of a subset of AI Impact Analytics metrics to all GitLab deployments, including dedicated and self-managed.

https://docs.gitlab.com/ee/api/graphql/reference/#codesuggestionevent

Edited by Gabe Weaver