Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
[Backport 5.0] [Request access] [telemetry]: Add allowlist event logs (
Browse files Browse the repository at this point in the history
…#50396)

https://github.com/sourcegraph/sourcegraph/pull/47741/files added a new
"request access" feature and new event logs.
This PR adds following event logs to the allowlist to make them
available in amplitude:
- `CreateAccessRequestSucceeded` - generated by backend event when new
request is submitted/created
- `AccessRequestFailed` - generated by backend event when new request
creation failed
- `AccessRequestsPageViewed` - by side admin when they visit a page
- `AccessRequestRejected` - by site admin when they reject a request
- `AccessRequestApproved` - by site admin when they approve a request
- Also adds some new experimental search input logs `SearchInputAdd`,
`SearchInputGoto` and `SearchInputCommand`

## Test plan
- The diff

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->
 <br> Backport 3d60485 from #50391

---------

Co-authored-by: Erzhan Torokulov <[email protected]>
Co-authored-by: Coury Clark <[email protected]>
  • Loading branch information
3 people authored Apr 5, 2023
1 parent d4b1524 commit d7ffaf0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- This migration was generated by the command `sg telemetry add`
DELETE FROM event_logs_export_allowlist WHERE event_name IN (SELECT * FROM UNNEST('{AccessRequestsPageViewed,AccessRequestFailed,CreateAccessRequestSucceeded,AccessRequestRejected,AccessRequestApproved,SearchInputAdd,SearchInputGoto,SearchInputCommand}'::TEXT[]));
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name: sg_telemetry_allowlist
parents: [1678899992, 1678994673]
2 changes: 2 additions & 0 deletions migrations/frontend/1680707560_sg_telemetry_allowlist/up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- This migration was generated by the command `sg telemetry add`
INSERT INTO event_logs_export_allowlist (event_name) VALUES (UNNEST('{AccessRequestsPageViewed,AccessRequestFailed,CreateAccessRequestSucceeded,AccessRequestRejected,AccessRequestApproved,SearchInputAdd,SearchInputGoto,SearchInputCommand}'::TEXT[])) ON CONFLICT DO NOTHING;

0 comments on commit d7ffaf0

Please sign in to comment.