Skip to content

Commit 249b852

Browse files
committed
Removed dropwizard from prod code
1 parent 245aab2 commit 249b852

File tree

6 files changed

+1
-311
lines changed

6 files changed

+1
-311
lines changed

services-benchmarks/src/main/java/io/scalecube/services/benchmarks/transport/BenchmarkServiceState.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public BenchmarkServiceState(BenchmarkSettings settings, Object... services) {
3232
public void beforeAll() {
3333
seed =
3434
Microservices.builder()
35-
.metrics(registry())
3635
.discovery(ScalecubeServiceDiscovery::new)
3736
.transport(RSocketServiceTransport::new)
3837
.startAwait();
@@ -41,7 +40,6 @@ public void beforeAll() {
4140

4241
node =
4342
Microservices.builder()
44-
.metrics(registry())
4543
.discovery(
4644
endpoint ->
4745
new ScalecubeServiceDiscovery(endpoint)

services/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@
2323
<artifactId>reactor-core</artifactId>
2424
</dependency>
2525

26-
<dependency>
27-
<groupId>io.dropwizard.metrics</groupId>
28-
<artifactId>metrics-core</artifactId>
29-
</dependency>
30-
3126
<dependency>
3227
<groupId>org.jctools</groupId>
3328
<artifactId>jctools-core</artifactId>

services/src/main/java/io/scalecube/services/Microservices.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.scalecube.services;
22

3-
import com.codahale.metrics.MetricRegistry;
43
import io.scalecube.net.Address;
54
import io.scalecube.services.auth.Authenticator;
65
import io.scalecube.services.discovery.api.ServiceDiscovery;
@@ -13,7 +12,6 @@
1312
import io.scalecube.services.methods.ServiceMethodInvoker;
1413
import io.scalecube.services.methods.ServiceMethodRegistry;
1514
import io.scalecube.services.methods.ServiceMethodRegistryImpl;
16-
import io.scalecube.services.metrics.Metrics;
1715
import io.scalecube.services.registry.ServiceRegistryImpl;
1816
import io.scalecube.services.registry.api.ServiceRegistry;
1917
import io.scalecube.services.routing.RoundRobinServiceRouter;
@@ -116,7 +114,6 @@ public final class Microservices {
116114
public static final Logger LOGGER = LoggerFactory.getLogger(Microservices.class);
117115

118116
private final String id = generateId();
119-
private final Metrics metrics;
120117
private final Map<String, String> tags;
121118
private final List<ServiceProvider> serviceProviders;
122119
private final ServiceRegistry serviceRegistry;
@@ -132,7 +129,6 @@ public final class Microservices {
132129
private final MonoProcessor<Void> onShutdown = MonoProcessor.create();
133130

134131
private Microservices(Builder builder) {
135-
this.metrics = builder.metrics;
136132
this.tags = new HashMap<>(builder.tags);
137133
this.serviceProviders = new ArrayList<>(builder.serviceProviders);
138134
this.serviceRegistry = builder.serviceRegistry;
@@ -233,11 +229,7 @@ private void registerInMethodRegistry(ServiceInfo serviceInfo) {
233229
}
234230

235231
private Mono<GatewayBootstrap> startGateway(ServiceCall call) {
236-
return gatewayBootstrap.start(this, new GatewayOptions().call(call).metrics(metrics));
237-
}
238-
239-
public Metrics metrics() {
240-
return this.metrics;
232+
return gatewayBootstrap.start(this, new GatewayOptions().call(call));
241233
}
242234

243235
public Address serviceAddress() {
@@ -311,7 +303,6 @@ private Mono<Void> processBeforeDestroy() {
311303

312304
public static final class Builder {
313305

314-
private Metrics metrics;
315306
private Map<String, String> tags = new HashMap<>();
316307
private List<ServiceProvider> serviceProviders = new ArrayList<>();
317308
private ServiceRegistry serviceRegistry = new ServiceRegistryImpl();
@@ -388,11 +379,6 @@ public Builder transport(Supplier<ServiceTransport> supplier) {
388379
return this;
389380
}
390381

391-
public Builder metrics(MetricRegistry metrics) {
392-
this.metrics = new Metrics(metrics);
393-
return this;
394-
}
395-
396382
public Builder tags(Map<String, String> tags) {
397383
this.tags = tags;
398384
return this;

services/src/main/java/io/scalecube/services/gateway/GatewayMetrics.java

Lines changed: 0 additions & 67 deletions
This file was deleted.

services/src/main/java/io/scalecube/services/gateway/GatewayOptions.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
package io.scalecube.services.gateway;
22

33
import io.scalecube.services.ServiceCall;
4-
import io.scalecube.services.metrics.Metrics;
54
import java.util.concurrent.Executor;
65
import java.util.function.Consumer;
76

87
public class GatewayOptions {
98

109
private Executor workerPool;
1110
private ServiceCall call;
12-
private Metrics metrics;
1311
private String id;
1412
private int port = 0;
1513

@@ -25,7 +23,6 @@ public GatewayOptions(GatewayOptions other) {
2523
this.port = other.port;
2624
this.workerPool = other.workerPool;
2725
this.call = other.call;
28-
this.metrics = other.metrics;
2926
}
3027

3128
private GatewayOptions set(Consumer<GatewayOptions> c) {
@@ -65,12 +62,4 @@ public GatewayOptions call(ServiceCall call) {
6562
public ServiceCall call() {
6663
return call;
6764
}
68-
69-
public GatewayOptions metrics(Metrics metrics) {
70-
return set(o -> o.metrics = metrics);
71-
}
72-
73-
public Metrics metrics() {
74-
return metrics;
75-
}
7665
}

0 commit comments

Comments
 (0)