[go: up one dir, main page]

Skip to content

Query user-level Duo Enterprise usage metrics

Problem to solve

TL;DR: "Are my developers using Duo? How are they using it?"

Customers have asked for insight into:

  • Which Duo features users are using?
  • How frequently are they using them?
  • Assigned seats that are not being utilized by the individual to which they are assigned.

Proposal

End the GraphQL API. Something like the following...

This needs to be handed on the group and project level for the AI Impact Dashboard.

query($fullPath: ID!, $startDate: Date, $endDate: Date) {
  namespace(fullPath: $fullPath) {
    aiMetrics(startDate: $startDate, endDate: $endDate) {
      userMetrics {
        nodes {
            user: UserCore!
            codeSuggestionsAccepted: Int ## Count of code suggestions accepted
            duoChatInteractions: Int   ## Count of total interactions with Duo Chat
            vulnerabilitiesExplained: Int ## Count of vulnerabilities explained with Duo
            vulnerabilitiesResolved: Int ## Count of vulnerabilities resolved with Duo
            cliInteractions: Int ## Count of interactions with glab_ask_git_command
            discussionsSummarized: Int ## Count of work item discussions summarized
            codeExplained: Int ## Count of explain_code interactions
            rootCauseAnalysisPerformed: Int ## Count of troubleshoot_job interactions
          }
      }
    }
  }
}

This issue will focus on the MVC which will only include the codeSuggestionsAccepted and duoChatInteractions metrics. Each of the other metrics will have their own issues.

Open questions / steps / todos

  • Confirm API structure
  • Confirm naming convention
  • Others?

Release notes

Prior to this release, it was not possible to get Duo Chat and Code Suggestions usage data per Duo Enterprise user. In 17.6, we've added a GraphQL API to provide visibility into the number of code suggestions accepted and Duo Chat interactions for each active Duo Enterprise user, enabling more granular insight into who is using which Duo Enterprise features and how frequently. This is the first iteration toward our goal of providing more comprehensive Duo Enterprise usage data within GitLab.

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

Edited by Gabe Weaver