diff --git a/src/main/java/com/uid2/core/Main.java b/src/main/java/com/uid2/core/Main.java index cce761b..0ecf138 100644 --- a/src/main/java/com/uid2/core/Main.java +++ b/src/main/java/com/uid2/core/Main.java @@ -49,6 +49,8 @@ public class Main { + private static final int vertxServiceInstances = 1; + public static void main(String[] args) { final String vertxConfigPath = System.getProperty(Const.Config.VERTX_CONFIG_PATH_PROP); if (vertxConfigPath != null) { @@ -157,7 +159,7 @@ public static void main(String[] args) { ); JwtService jwtService = new JwtService(config); - + createServiceInstancesMetric(); coreVerticle = new CoreVerticle(cloudStorage, operatorKeyProvider, attestationService, attestationTokenService, enclaveIdProvider, operatorJWTTokenProvider, jwtService, cloudEncryptionKeyProvider); } catch (Exception e) { System.out.println("failed to initialize core verticle: " + e.getMessage()); @@ -210,6 +212,12 @@ private static void setupMetrics(MicrometerMetricsOptions metricOptions) { .register(Metrics.globalRegistry); } + private static void createServiceInstancesMetric() { + Gauge.builder("uid2.core.vertx_service_instances", () -> vertxServiceInstances) + .description("gauge for number of request processing threads") + .register(Metrics.globalRegistry); + } + /* private static CommandLine parseArgs(String[] args) { final CLI cli = CLI.create("uid2-core")