Skip to content
Permalink
Browse files

Added tracing for outgoing requests

  • Loading branch information...
evader1337 committed Feb 11, 2019
1 parent 297b40b commit 8df8560fe19f9e2d384de282cf9b5ce8fefb3a49
@@ -1,5 +1,7 @@
package com.kumuluz.ee.samples.opentracing.tutorial.alpha; package com.kumuluz.ee.samples.opentracing.tutorial.alpha;


import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@@ -13,7 +15,7 @@
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public class Resource { public class Resource {
private Client client = ClientBuilder.newClient(); private Client client = ClientTracingRegistrar.configure(ClientBuilder.newBuilder()).build();


@GET @GET
public Response get() { public Response get() {
@@ -1,5 +1,7 @@
package com.kumuluz.ee.samples.opentracing.tutorial.beta; package com.kumuluz.ee.samples.opentracing.tutorial.beta;


import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@@ -14,7 +16,7 @@
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public class Resource { public class Resource {
private Client client = ClientBuilder.newClient(); private Client client = ClientTracingRegistrar.configure(ClientBuilder.newBuilder()).build();


@GET @GET
public Response get() { public Response get() {
@@ -1,5 +1,7 @@
package com.kumuluz.ee.samples.opentracing.tutorial.gamma; package com.kumuluz.ee.samples.opentracing.tutorial.gamma;


import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

import javax.enterprise.context.ApplicationScoped; import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject; import javax.inject.Inject;
import javax.ws.rs.*; import javax.ws.rs.*;
@@ -13,7 +15,7 @@
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
@ApplicationScoped @ApplicationScoped
public class Resource { public class Resource {
private Client client = ClientBuilder.newClient(); private Client client = ClientTracingRegistrar.configure(ClientBuilder.newBuilder()).build();


@Inject @Inject
private Database database; private Database database;
@@ -1,5 +1,7 @@
package com.kumuluz.ee.samples.opentracing.tutorial.master; package com.kumuluz.ee.samples.opentracing.tutorial.master;


import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
@@ -13,7 +15,7 @@
@Consumes(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON)
public class Resource { public class Resource {
private Client client = ClientBuilder.newClient(); private Client client = ClientTracingRegistrar.configure(ClientBuilder.newBuilder()).build();


@GET @GET
public Response get() { public Response get() {

0 comments on commit 8df8560

Please sign in to comment.
You can’t perform that action at this time.