Internal error tracking check endpoint
What does this MR do and why?
This MR implements an "enabled" check for the integrated error tracking feature. This internal API will be used for "permission" checks when ingesting error events.
See the example in the doc.
How to set up and validate locally
- Create a new project
- Enable the integrated error tracking: Settings > Monitor > Error Tracking
- Use the
curl
example from the docs to trigger an internal request. - The API should return
enabled: true
Database
Up:
== 20220518102414 AddIndexToErrorTrackingClientKeys: migrating ================
-- transaction_open?()
-> 0.0000s
-- index_exists?(:error_tracking_client_keys, [:project_id, :public_key], {:where=>"active = true", :name=>"index_error_tracking_client_for_enabled_check", :algorithm=>:concurrently})
-> 0.0043s
-- execute("SET statement_timeout TO 0")
-> 0.0003s
-- add_index(:error_tracking_client_keys, [:project_id, :public_key], {:where=>"active = true", :name=>"index_error_tracking_client_for_enabled_check", :algorithm=>:concurrently})
-> 0.0076s
-- execute("RESET statement_timeout")
-> 0.0004s
== 20220518102414 AddIndexToErrorTrackingClientKeys: migrated (0.0179s) =======
Down:
== 20220518102414 AddIndexToErrorTrackingClientKeys: reverting ================
-- transaction_open?()
-> 0.0000s
-- indexes(:error_tracking_client_keys)
-> 0.0088s
-- execute("SET statement_timeout TO 0")
-> 0.0005s
-- remove_index(:error_tracking_client_keys, {:algorithm=>:concurrently, :name=>"index_error_tracking_client_for_enabled_check"})
-> 0.0027s
-- execute("RESET statement_timeout")
-> 0.0004s
== 20220518102414 AddIndexToErrorTrackingClientKeys: reverted (0.0178s) =======
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 Peter Leitzen