Skip to content

Add PUT API to create error tracking project settings

Arun Sori requested to merge arun/add-err-track-settings-put into master

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 enables integrated 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.

  1. Enable the feature flags for integrated error tracking
    Feature.enable(:integrated_error_tracking);
    Feature.enable(:use_click_house_database_for_error_tracking);
  2. Create a new project either manually or via the API.
  3. 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"
  4. 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.

Edited by Arun Sori

Merge request reports