doc/development/internal_analytics/internal_event_instrumentation/duo_classification.md
This guide explains how to properly add the classification: duo field to event definitions for AI and GitLab Duo features.
classification field?The classification field is an optional property in event definitions that categorizes events based on their data handling requirements. Currently, the only supported value is duo, which is used specifically for AI and GitLab Duo-related features.
classification: duoAdd classification: duo to your event definition when:
duo_chatai_frameworkduo_agent_framework[!note] Events with
classification: duoshould also include the AI Context for comprehensive tracking of AI-specific attributes such as session identifiers, workflow information, token usage, and model details. See the AI Context Fields documentation for complete field descriptions and usage examples.
classification: duoImportant: Do not add classification: duo if:
If your event doesn't fall under GitLab Duo features, remove the classification field entirely rather than leaving it empty.
Events with classification: duo are treated as operational data, which means:
classification: duoHere's an example of a properly configured GitLab Duo Chat event:
---
description: "User submits a Duo Chat message.
The message is analyzed using LLM (e.g. categorization) and Ruby (e.g. message length).
Schema: https://gitlab.com/gitlab-org/iglu/-/blob/master/public/schemas/com.gitlab/ai_question_category/jsonschema
Category list: https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/lib/gitlab/llm/fixtures/categories.xml"
category: Gitlab::Llm::AiGateway::Completions::CategorizeQuestion
action: ai_question_category
classification: duo
identifiers:
- user
product_group: duo_chat
milestone: '16.6'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/132803
tiers:
- ultimate
additional_properties:
property:
description: Request ID to link to other events of the same AI request.
Events defined by other services that are forwarded through the monolith should be added to the list in EventEligibilityChecker.
This ensures that events are forwarded through the instance even when analytics data collection is opted out.
---
description: Tracks duo workflow start event
internal_events: true
action: start_duo_workflow_execution
classification: duo
identifiers:
- user
- project
- namespace
product_group: duo_agent_framework
milestone: '17.0'
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150000
tiers:
- ultimate
The classification field is validated against the JSON Schema. Currently, only duo is accepted as a valid value.