aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver/src
diff options
context:
space:
mode:
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>2021-12-08 09:35:06 +0100
committerLukasz Jarocki <lukasz.jarocki@sonarsource.com>2021-12-13 15:22:35 +0100
commitd58a45b4b4fd196cccb8cbd1c9a479a3c783afe3 (patch)
treecfeb1df309b2eaaa2adeae63780472d0c0108172 /server/sonar-webserver/src
parent601e7fbb0ca7cd323b69742e15cd016dac46cf62 (diff)
downloadsonarqube-d58a45b4b4fd196cccb8cbd1c9a479a3c783afe3.tar.gz
sonarqube-d58a45b4b4fd196cccb8cbd1c9a479a3c783afe3.zip
SONAR-15769 added metrics for integration with devops platforms
Diffstat (limited to 'server/sonar-webserver/src')
-rw-r--r--server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java16
-rw-r--r--server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelSafeMode.java6
2 files changed, 21 insertions, 1 deletions
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
index a0b22729d1b..fe0c229346c 100644
--- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
+++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel4.java
@@ -22,11 +22,16 @@ package org.sonar.server.platform.platformlevel;
import java.util.List;
import org.sonar.alm.client.TimeoutConfigurationImpl;
import org.sonar.alm.client.azure.AzureDevOpsHttpClient;
+import org.sonar.alm.client.azure.AzureDevOpsValidator;
import org.sonar.alm.client.bitbucket.bitbucketcloud.BitbucketCloudRestClient;
+import org.sonar.alm.client.bitbucket.bitbucketcloud.BitbucketCloudValidator;
import org.sonar.alm.client.bitbucketserver.BitbucketServerRestClient;
+import org.sonar.alm.client.bitbucketserver.BitbucketServerSettingsValidator;
import org.sonar.alm.client.github.GithubApplicationClientImpl;
import org.sonar.alm.client.github.GithubApplicationHttpClientImpl;
+import org.sonar.alm.client.github.GithubGlobalSettingsValidator;
import org.sonar.alm.client.github.security.GithubAppSecurityImpl;
+import org.sonar.alm.client.gitlab.GitlabGlobalSettingsValidator;
import org.sonar.alm.client.gitlab.GitlabHttpClient;
import org.sonar.api.profiles.XMLProfileParser;
import org.sonar.api.profiles.XMLProfileSerializer;
@@ -122,6 +127,8 @@ import org.sonar.server.metric.MetricFinder;
import org.sonar.server.metric.UnanalyzedLanguageMetrics;
import org.sonar.server.metric.ws.MetricsWsModule;
import org.sonar.server.monitoring.MonitoringWsModule;
+import org.sonar.server.monitoring.devops.DevOpsPlatformsMetricsCollector;
+import org.sonar.server.monitoring.ServerMonitoringMetrics;
import org.sonar.server.newcodeperiod.ws.NewCodePeriodsWsModule;
import org.sonar.server.notification.NotificationModule;
import org.sonar.server.notification.ws.NotificationWsModule;
@@ -508,6 +515,11 @@ public class PlatformLevel4 extends PlatformLevel {
GitlabHttpClient.class,
AzureDevOpsHttpClient.class,
AlmIntegrationsWSModule.class,
+ BitbucketCloudValidator.class,
+ BitbucketServerSettingsValidator.class,
+ GithubGlobalSettingsValidator.class,
+ GitlabGlobalSettingsValidator.class,
+ AzureDevOpsValidator.class,
// ALM settings
AlmSettingsWsModule.class,
@@ -564,6 +576,10 @@ public class PlatformLevel4 extends PlatformLevel {
TelemetryDaemon.class,
TelemetryClient.class,
+ // monitoring
+ ServerMonitoringMetrics.class,
+ DevOpsPlatformsMetricsCollector.class,
+
PluginsRiskConsentFilter.class
);
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelSafeMode.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelSafeMode.java
index fb0bea230f4..311b34c3cff 100644
--- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelSafeMode.java
+++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevelSafeMode.java
@@ -20,6 +20,7 @@
package org.sonar.server.platform.platformlevel;
import org.sonar.server.authentication.SafeModeUserSession;
+import org.sonar.server.monitoring.ServerMonitoringMetrics;
import org.sonar.server.platform.ServerImpl;
import org.sonar.server.platform.db.migration.AutoDbMigration;
import org.sonar.server.platform.db.migration.DatabaseMigrationImpl;
@@ -57,7 +58,10 @@ public class PlatformLevelSafeMode extends PlatformLevel {
// WS engine
SafeModeUserSession.class,
WebServiceEngine.class,
- WebServiceFilter.class);
+ WebServiceFilter.class,
+
+ // Monitoring
+ ServerMonitoringMetrics.class);
addIfStartupLeader(
DatabaseMigrationImpl.class,
MigrationEngineModule.class,