Skip to content
代码片段 群组 项目
未验证 提交 6186e722 编辑于 作者: Michał Wielich's avatar Michał Wielich 提交者: GitLab
浏览文件

Merge branch 'ankit.panchal/standard-context-add-field' into 'master'

docs: Clarify process for adding new fields to standard context

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180336



Merged-by: default avatarMichał Wielich <mwielich@gitlab.com>
Approved-by: default avatarMichał Wielich <mwielich@gitlab.com>
Reviewed-by: default avatarMichał Wielich <mwielich@gitlab.com>
Reviewed-by: default avatarSarah Yasonik <syasonik@gitlab.com>
Reviewed-by: default avatarAnkit Panchal <apanchal@gitlab.com>
Co-authored-by: default avatarAnkit Panchal <apanchal@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -59,6 +59,17 @@ Standard context, also referred to as [Cloud context](https://gitlab.com/gitlab-
| `correlation_id` | string, null | Unique request ID for each request. | `uuid` |
| `extra` | object, null | Additional data associated with the event, in key-value pair format. | `{"key": "value"}` |
### Adding a New Field to the Standard Context
To add a new field to the standard context:
1. Create a merge request in the [iglu](https://gitlab.com/gitlab-org/iglu/-/tree/master/public/schemas/com.gitlab/gitlab_standard/jsonschema?ref_type=heads) repository to update the schema.
1. If the new field should be pseudonymized, add it to the [ATTRIBUTE_TO_PSEUDONYMISE](https://gitlab.com/gitlab-org/analytics-section/analytics-instrumentation/snowplow-pseudonymization/-/blob/main/lib/snowplow/gitlab_standard_context.rb?ref_type=heads#L9) constant in the `snowplow-pseudonymization` project.
1. Update the `GITLAB_STANDARD_SCHEMA_URL` in [tracking/standard_context.rb](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/tracking/standard_context.rb#L6) to match the new version from `gitlab-org/iglu`.
1. Start sending events that include the new field in Standard Context.
### Related Links
- Descriptions of Unit Primitives are documented in [cloud connector](https://gitlab.com/gitlab-org/cloud-connector/gitlab-cloud-connector/-/tree/main/config/unit_primitives).
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册