openzipkin / zipkin-support

repository for support questions raised as issues
4 stars 2 forks source link

serverName always empty for JAXRS2 TracingClientFilter #4

Closed svenhaag closed 4 years ago

svenhaag commented 4 years ago

Feature: Currently, when building a TracingClientFilter via brave.jaxrs2.TracingClientFilter#create(brave.Tracing) it's doing brave.http.HttpTracing#create(Tracing) internally, which sets serverName = "". Unfortunatelly there seems no possibility to set it. It would be great to have a another create method which takes brave.http.HttpTracing, e.g.: HttpTracing.create(tracing).clientOf("my-server-name").

codefromthecrypt commented 4 years ago

maybe you have an old version of brave? the current code has a factory method and also an injected constructor like you asked..

  @Inject TracingClientFilter(HttpTracing httpTracing) {
    if (httpTracing == null) throw new NullPointerException("HttpTracing == null");
    tracer = httpTracing.tracing().tracer();
    handler = HttpClientHandler.create(httpTracing);
  }
svenhaag commented 4 years ago

Indeed, thanks for the quick reply. This can be closed then.