diff options
Diffstat (limited to 'qa/qa/support/system_logs/sentry.rb')
-rw-r--r-- | qa/qa/support/system_logs/sentry.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/qa/qa/support/system_logs/sentry.rb b/qa/qa/support/system_logs/sentry.rb new file mode 100644 index 00000000000..a1bd53e7d7a --- /dev/null +++ b/qa/qa/support/system_logs/sentry.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true + +module QA + module Support + module SystemLogs + class Sentry + BASE_URLS = { + staging: 'https://sentry.gitlab.net/gitlab/staginggitlabcom/?environment=gstg', + staging_ref: 'https://sentry.gitlab.net/gitlab/staging-ref/?environment=all', + pre: 'https://sentry.gitlab.net/gitlab/pregitlabcom/?environment=all', + production: 'https://sentry.gitlab.net/gitlab/gitlabcom/?environment=gprd' + }.freeze + + def initialize(env, correlation_id) + @base_url = BASE_URLS[env] + @correlation_id = correlation_id + end + + def url + return if @base_url.nil? + + "#{@base_url}&query=correlation_id%3A%22#{@correlation_id}%22" + end + end + end + end +end |