aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver/src
diff options
context:
space:
mode:
authorMatteo Mara <matteo.mara@sonarsource.com>2024-07-17 17:09:08 +0200
committersonartech <sonartech@sonarsource.com>2024-07-24 20:02:48 +0000
commit9258d5846d5e0947a7ff7813751224af537b20ee (patch)
treeeddc43e41902229945934b835d9f34b8774688b4 /server/sonar-webserver/src
parent0ce62a09539920b477873c2c26e9a6d2fc62a15e (diff)
downloadsonarqube-9258d5846d5e0947a7ff7813751224af537b20ee.tar.gz
sonarqube-9258d5846d5e0947a7ff7813751224af537b20ee.zip
SONAR-22479 Added new upgrade related telemetry metrics for the installation dimension
Diffstat (limited to 'server/sonar-webserver/src')
-rw-r--r--server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java6
-rw-r--r--server/sonar-webserver/src/test/java/org/sonar/server/platform/platformlevel/PlatformLevel2Test.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java
index 6f3d42fe969..18ad5986239 100644
--- a/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java
+++ b/server/sonar-webserver/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java
@@ -36,6 +36,9 @@ import org.sonar.server.platform.db.migration.DatabaseMigrationStateImpl;
import org.sonar.server.platform.db.migration.MigrationConfigurationModule;
import org.sonar.server.platform.db.migration.charset.DatabaseCharsetChecker;
import org.sonar.server.platform.db.migration.version.DatabaseVersion;
+import org.sonar.server.telemetry.TelemetryDbMigrationSuccessProvider;
+import org.sonar.server.telemetry.TelemetryDbMigrationStepsProvider;
+import org.sonar.server.telemetry.TelemetryDbMigrationTotalTimeProvider;
import org.sonar.server.platform.web.WebPagesCache;
import org.sonar.server.plugins.InstalledPluginReferentialFactory;
import org.sonar.server.plugins.PluginJarLoader;
@@ -84,6 +87,9 @@ public class PlatformLevel2 extends PlatformLevel {
// Migration state must be kept at level2 to survive moving in and then out of safe mode
// ExecutorService must be kept at level2 because stopping it when stopping safe mode level causes error making SQ fail
add(
+ TelemetryDbMigrationTotalTimeProvider.class,
+ TelemetryDbMigrationStepsProvider.class,
+ TelemetryDbMigrationSuccessProvider.class,
DatabaseMigrationStateImpl.class,
DatabaseMigrationExecutorServiceImpl.class);
diff --git a/server/sonar-webserver/src/test/java/org/sonar/server/platform/platformlevel/PlatformLevel2Test.java b/server/sonar-webserver/src/test/java/org/sonar/server/platform/platformlevel/PlatformLevel2Test.java
index b3c5178bfb0..cf7fb74b314 100644
--- a/server/sonar-webserver/src/test/java/org/sonar/server/platform/platformlevel/PlatformLevel2Test.java
+++ b/server/sonar-webserver/src/test/java/org/sonar/server/platform/platformlevel/PlatformLevel2Test.java
@@ -73,7 +73,7 @@ public class PlatformLevel2Test {
verify(container).add(ServerPluginRepository.class);
verify(container).add(DatabaseCharsetChecker.class);
- verify(container, times(21)).add(any());
+ verify(container, times(24)).add(any());
}
@Test
@@ -94,7 +94,7 @@ public class PlatformLevel2Test {
verify(container).add(ServerPluginRepository.class);
verify(container, never()).add(DatabaseCharsetChecker.class);
- verify(container, times(19)).add(any());
+ verify(container, times(22)).add(any());
}