Add PUT API to create error tracking project settings
What does this MR do and why?
- Adds capability to create error tracking project settings via API. Currently it is only possible to patch the project settings related to error tracking API.
- Adds a
PUT
method on:id/project/settings
that updates the status (if error tracking is active or not) and enablesintegrated
backend. - This is an addition to existing available APIs for project settings and does not change behavior for other APIs.
Closes #393035 (closed).
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Enable the feature flags for integrated error tracking
Feature.enable(:integrated_error_tracking); Feature.enable(:use_click_house_database_for_error_tracking);
- Create a new project either manually or via the API.
- Create error tracking settings for the project
$ curl --request PUT --header "PRIVATE-TOKEN: $TOKEN" "https://gitlab.example.host/api/v4/projects/:id/error_tracking/settings?active=true&integrated=true"
- Verify by fetching client keys for the project
$ curl --request GET --header "PRIVATE-TOKEN: $TOKEN" "https://gitlab.example.host/api/v4/projects/:id/error_tracking/client_keys"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Arun Sori