forked from vert-x3/vertx-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloService.java
More file actions
25 lines (19 loc) · 755 Bytes
/
HelloService.java
File metadata and controls
25 lines (19 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package io.vertx.example.zipkin;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.example.tracing.HelloVerticle;
import io.vertx.tracing.zipkin.ZipkinTracingOptions;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class HelloService {
public static void main(String[] args) throws InterruptedException, ExecutionException, TimeoutException {
Vertx vertx = Vertx.vertx(new VertxOptions()
.setTracingOptions(new ZipkinTracingOptions().setServiceName("HelloService"))
);
vertx.deployVerticle(new HelloVerticle())
.toCompletionStage()
.toCompletableFuture()
.get(30, TimeUnit.SECONDS);
}
}