Add use_pat event
What does this MR do and why?
This MR adds a new use_pat event for the use case described here
References
How to validate
-
Create a PAT on
http://127.0.0.1:3000)/-/user_settings/personal_access_tokens, make sure to copy the token! -
Enable the feature flag
# rails c
Feature.enable(:track_api_request_from_personal_access_token, PersonalAccessToken.last.user)- Run internal events monitor
rails runner scripts/internal_events/monitor.rb use_pat- Send a request with your token
curl --header "Private-Token: <your-token>" "https://gitlab.example.com/api/v4/user"You should see an event appear in the monitor:
Edited by Matthew MacRae-Bovell
