Skip to content

Commit

Permalink
Added tracing for outgoing requests
Browse files Browse the repository at this point in the history
  • Loading branch information
evader1337 committed Feb 11, 2019
1 parent 297b40b commit 8df8560
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
@@ -1,5 +1,7 @@
package com.kumuluz.ee.samples.opentracing.tutorial.alpha;

import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

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

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

import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

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

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

import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

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

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

import org.eclipse.microprofile.opentracing.ClientTracingRegistrar;

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

@GET
public Response get() {
Expand Down

0 comments on commit 8df8560

Please sign in to comment.