Search in sources :

Example 1 with EndToEndBehaviorResource

use of com.uber.jaeger.crossdock.resources.behavior.http.EndToEndBehaviorResource in project jaeger-client-java by jaegertracing.

the class JerseyServer method main.

public static void main(String[] args) throws Exception {
    BasicConfigurator.configure();
    String serviceName = serviceNameFromEnv();
    JerseyServer server = new JerseyServer("0.0.0.0:8081", serviceName, Arrays.asList(new TraceBehaviorResource(), new EndToEndBehaviorResource(new EndToEndBehavior(getEvn(SAMPLING_HOST_PORT, "jaeger-agent:5778"), "crossdock-" + serviceName, senderFromEnv(getEvn(COLLECTOR_HOST_PORT, "jaeger-collector:14268"), getEvn(AGENT_HOST, "jaeger-agent")))), new HealthResource()));
    server.addNetworkListener(new NetworkListener("health", "0.0.0.0", 8080));
    Builder tchannelBuilder = new Builder(serviceName);
    tchannelBuilder.setServerPort(8082);
    new TChannelServer(tchannelBuilder, new TraceBehavior(), server.getTracer()).start();
}
Also used : EndToEndBehavior(com.uber.jaeger.crossdock.resources.behavior.EndToEndBehavior) TraceBehavior(com.uber.jaeger.crossdock.resources.behavior.TraceBehavior) TraceBehaviorResource(com.uber.jaeger.crossdock.resources.behavior.http.TraceBehaviorResource) Builder(com.uber.tchannel.api.TChannel.Builder) ClientBuilder(javax.ws.rs.client.ClientBuilder) EndToEndBehaviorResource(com.uber.jaeger.crossdock.resources.behavior.http.EndToEndBehaviorResource) TChannelServer(com.uber.jaeger.crossdock.resources.behavior.tchannel.TChannelServer) HealthResource(com.uber.jaeger.crossdock.resources.health.HealthResource) NetworkListener(org.glassfish.grizzly.http.server.NetworkListener)

Aggregations

EndToEndBehavior (com.uber.jaeger.crossdock.resources.behavior.EndToEndBehavior)1 TraceBehavior (com.uber.jaeger.crossdock.resources.behavior.TraceBehavior)1 EndToEndBehaviorResource (com.uber.jaeger.crossdock.resources.behavior.http.EndToEndBehaviorResource)1 TraceBehaviorResource (com.uber.jaeger.crossdock.resources.behavior.http.TraceBehaviorResource)1 TChannelServer (com.uber.jaeger.crossdock.resources.behavior.tchannel.TChannelServer)1 HealthResource (com.uber.jaeger.crossdock.resources.health.HealthResource)1 Builder (com.uber.tchannel.api.TChannel.Builder)1 ClientBuilder (javax.ws.rs.client.ClientBuilder)1 NetworkListener (org.glassfish.grizzly.http.server.NetworkListener)1