Event dictionary guide
This guide describes the event dictionary and how it’s implemented.
Event definition and validation
This process is meant to document all Snowplow events and ensure consistency. Event definitions must comply with the JSON Schema.
All event definitions are stored in the following directories:
Each event is defined in a separate YAML file consisting of the following fields:
|yes||A description of the event.|
|yes||The event category (see Event schema).|
|yes||The event action (see Event schema).|
|no||A description of the event label (see Event schema).|
|no||A description of the event property (see Event schema).|
|no||A description of the event value (see Event schema).|
|no||The type and description of each extra property sent with the event.|
|no||A list of identifiers sent with the event. Can be set to one or more of |
|no||The URL to the custom schema sent with the event, for example, |
|no||The stage for the event.|
|yes||The group that owns the event.|
|no||The product category for the event.|
|no||The milestone when the event is introduced.|
|no||The URL to the merge request that introduced the event.|
|yes||The distributions where the tracked feature is available. Can be set to one or more of |
|yes||The tiers where the tracked feature is available. Can be set to one or more of |
Example event definition
YAML file includes an example event definition.
description: Issue promoted to epic category: epics action: promote property_description: The string "issue_id" value_description: ID of the issue extra_properties: weight: type: integer description: Weight of the issue identifiers: - project - user - namespace product_section: dev product_stage: plan product_group: group::product planning product_category: epics milestone: "11.10" introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/10537 distributions: - ee tiers: - premium - ultimate
Create a new event definition
Use the dedicated event definition generator to create new event definitions.
action of each event are included in the filename to standardize file naming.
The generator takes three options:
--ee: Indicates if the event is for EE.
--category=CATEGORY: Indicates the
categoryof the event.
--action=ACTION: Indicates the
actionof the event.
bundle exec rails generate gitlab:snowplow_event_definition --category Groups::EmailCampaignsController --action click create create config/events/groups__email_campaigns_controller_click.yml