use of org.wildfly.extension.microprofile.metrics.MicroProfileVendorMetricRegistry in project wildfly by wildfly.
the class DeploymentMetricService method start.
@Override
public void start(StartContext startContext) {
final Runnable task = new Runnable() {
@Override
public void run() {
try {
registration = new MetricRegistration(new MicroProfileVendorMetricRegistry());
metricCollector.get().collectResourceMetrics(rootResource, managementResourceRegistration, // prepend the deployment address to the subsystem resource address
address -> deploymentAddress.append(address), exposeAnySubsystem, exposedSubsystems, prefix, registration);
} catch (Throwable t) {
t.printStackTrace();
throw t;
}
startContext.complete();
}
};
try {
managementExecutor.get().execute(task);
} catch (RejectedExecutionException e) {
task.run();
} finally {
startContext.asynchronous();
}
}
Aggregations