Additional internal event properties handling
What does this MR do and why?
Related to #434504 (closed)
Make it possible to pass property, value & label to InternalEvents.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
- Enable snowplow micro
- Trigger an event that has the new attributes: for example, open the console and perform
Gitlab::InternalEvents.track_event('user_viewed_dashboard_list', user: User.first, additional_properties: { label: 'event_label', property: 'event_prop', value: 123 })
- Check if a new event with that includes the sent property, label and value has been registered at
localhost:9090/micro/good
- Add an event with mapping: following the new instructions in the
internal_event_instrumentation/quick_start.md
file, add aproperties
section to a new or an existing event file. For example, add this segment into the user_viewed_dashboard_list.yml file:
properties:
user_role:
external_key: label
- Clean up the memoized events library by running
reload!
in the console - Trigger this event using the mapped keys, for example:
Gitlab::InternalEvents.track_event('user_viewed_dashboard_list', user: User.first, additional_properties: { user_role: 'admin', value: 14 })
- Check if a new event with that includes the sent property, label and/or value has been registered at
localhost:9090/micro/good
Merge request reports
Activity
assigned to @michold
changed milestone to %16.9
added devopsmonitor featureaddition groupanalytics instrumentation missed:16.8 sectionanalytics typefeature workflowin dev + 1 deleted label
removed missed:16.8 label
removed workflowin dev label
- Resolved by Suraj Tripathi
- A deleted user
added backend label
1 Message This MR contains docs in the /development directory. Any Maintainer, other than the author, can merge. You do not need tech writer review. Reviewer roulette
Category Reviewer Maintainer backend @tyleramos
(UTC-5, 6 hours behind author)
@jwoodwardgl
(UTC+0, 1 hour behind author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Danger- Resolved by Suraj Tripathi
E2E Test Result Summary
allure-report-publisher
generated test report!e2e-test-on-gdk:
test report for 7f14713cexpand test summary
+------------------------------------------------------------------+ | suites summary | +-------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +-------------+--------+--------+---------+-------+-------+--------+ | Govern | 3 | 0 | 0 | 0 | 3 | ✅ | | Monitor | 7 | 0 | 0 | 0 | 7 | ✅ | | Plan | 4 | 0 | 0 | 0 | 4 | ✅ | | Data Stores | 2 | 0 | 0 | 0 | 2 | ✅ | | Create | 8 | 0 | 3 | 0 | 11 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | +-------------+--------+--------+---------+-------+-------+--------+ | Total | 24 | 0 | 4 | 0 | 28 | ✅ | +-------------+--------+--------+---------+-------+-------+--------+
e2e-package-and-test:
test report for 7f14713cexpand test summary
+---------------------------------------------------------------------+ | suites summary | +----------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +----------------+--------+--------+---------+-------+-------+--------+ | Monitor | 36 | 0 | 13 | 0 | 49 | ✅ | | GitLab Metrics | 2 | 0 | 1 | 0 | 3 | ✅ | | Create | 153 | 0 | 19 | 4 | 172 | ✅ | | Govern | 6 | 0 | 0 | 0 | 6 | ✅ | | Plan | 8 | 0 | 0 | 0 | 8 | ✅ | | Package | 0 | 0 | 2 | 0 | 2 | ➖ | | Data Stores | 4 | 0 | 0 | 0 | 4 | ✅ | +----------------+--------+--------+---------+-------+-------+--------+ | Total | 209 | 0 | 35 | 4 | 244 | ✅ | +----------------+--------+--------+---------+-------+-------+--------+
added 1 commit
- 888fa11a - Additional internal event properties handling
added 1 commit
- ecb15c5f - Additional internal event properties handling
- Resolved by Michał Wielich
Hi @syasonik! Can you please give this a backend & analytics instrumentation review?
requested review from @syasonik
- A deleted user
added development guidelines docsimprovement documentation maintenancerefactor typemaintenance labels and removed typefeature label
removed featureaddition label
- Resolved by Michał Wielich
@michold I'm a bit confused here: #434504 (closed) and the accompanying epic &12212 (closed) both call out a method signature that's different. Specifically, the idea was that the signature should clearly signify that
label
,properties
etc. are additional properties that are not pseudo-required such as user or namespace (which always should be passed if available), and which makes it easy to transition to fully custom properties with different names without having to change the signature, e.g.Gitlab::InternalEvents.track_event( "push_package_to_repository", user: user, namespace: namespace, project: project additionalProperties: { label: "nuget"} )
could become
Gitlab::InternalEvents.track_event( "push_package_to_repository", user: user, namespace: namespace, project: project additionalProperties: { repository_type: "nuget"} )
in a later iteration.
Is there a specific reason why you put
label
etc on the same level asuser
?
removed review request for @syasonik
- Resolved by Sarah Yasonik
- Resolved by Sarah Yasonik
mentioned in issue #434504 (closed)
mentioned in issue #440450 (closed)
added 1 commit
- 7a9c41dc - Additional internal event properties handling
added 2477 commits
-
7a9c41dc...bb458267 - 2476 commits from branch
master
- 5aa3fa7e - Additional internal event properties handling
-
7a9c41dc...bb458267 - 2476 commits from branch
added 1 commit
- ad35a336 - Additional internal event properties handling
requested review from @syasonik
- Resolved by Sarah Yasonik
- Resolved by Sarah Yasonik
- Resolved by Sarah Yasonik
- Resolved by Sarah Yasonik
removed review request for @syasonik
changed milestone to %16.10
added missed:16.9 label
requested review from @syasonik
- Resolved by Sarah Yasonik
removed review request for @syasonik
mentioned in issue #442452
added 1 commit
- 36e9c805 - Add ruby SDK tracking of additional properties
requested review from @syasonik
removed review request for @syasonik
- Resolved by Suraj Tripathi
@syasonik
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
requested review from @furkanayhan
removed review request for @furkanayhan
requested review from @suraj_tripathy
- Resolved by Suraj Tripathi
- Resolved by Suraj Tripathi
- Resolved by Suraj Tripathi
added 1 commit
- 79b78d8e - Refactor InternalEvents & fix external_key bug
added 3345 commits
-
79b78d8e...aa5c69c6 - 3341 commits from branch
master
- 229de163 - Additional internal event properties handling
- e071e0b4 - Rewrite the add_prop documentation
- 0d5320a9 - Add ruby SDK tracking of additional properties
- 791b7ee3 - Refactor InternalEvents & fix external_key bug
Toggle commit list-
79b78d8e...aa5c69c6 - 3341 commits from branch
enabled an automatic merge when the pipeline for a6bf6be9 succeeds
added 222 commits
-
791b7ee3...f379c859 - 218 commits from branch
master
- e8f234c1 - Additional internal event properties handling
- 48e1b962 - Rewrite the add_prop documentation
- 22cae5a3 - Add ruby SDK tracking of additional properties
- 7f14713c - Refactor InternalEvents & fix external_key bug
Toggle commit list-
791b7ee3...f379c859 - 218 commits from branch
enabled an automatic merge when the pipeline for abd743cd succeeds
mentioned in commit 30a6b01b
mentioned in merge request !146209 (merged)
added workflowstaging-canary label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added releasedcandidate label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
mentioned in merge request !146481 (merged)
mentioned in issue #462378 (closed)
mentioned in merge request !169685 (closed)