Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/observability.rb')
-rw-r--r--lib/gitlab/observability.rb22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/gitlab/observability.rb b/lib/gitlab/observability.rb
index f7f65c91339..b500df86363 100644
--- a/lib/gitlab/observability.rb
+++ b/lib/gitlab/observability.rb
@@ -23,7 +23,22 @@ module Gitlab
'https://observe.gitlab.com'
end
- # Returns true if the Observability feature flag is enabled
+ def oauth_url
+ "#{Gitlab::Observability.observability_url}/v1/auth/start"
+ end
+
+ def tracing_url(project)
+ "#{Gitlab::Observability.observability_url}/query/#{project.group.id}/#{project.id}/v1/traces"
+ end
+
+ def provisioning_url(_project)
+ # TODO Change to correct endpoint when API is ready
+ Gitlab::Observability.observability_url.to_s
+ end
+
+ # Returns true if the GitLab Observability UI (GOUI) feature flag is enabled
+ #
+ # @deprecated
#
def enabled?(group = nil)
return Feature.enabled?(:observability_group_tab, group) if group
@@ -31,6 +46,11 @@ module Gitlab
Feature.enabled?(:observability_group_tab)
end
+ # Returns true if Tracing UI is enabled
+ def tracing_enabled?(project)
+ Feature.enabled?(:observability_tracing, project)
+ end
+
# Returns the embeddable Observability URL of a given URL
#
# - Validates the URL