openzipkin / zipkin-support

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

Using the OkHttpSender with basic auth #27

Closed DarwinSin closed 4 years ago

DarwinSin commented 4 years ago

I am attempting to use the OKHttpSender with basic authentication, following the steps on the java doc. The .clientBuilder().authenticator(myAuthenticator).build() returns me an OKHttpClient, but the OKHttpSender has no public constructor or builder to pass in this authenticated client . How do I go about implementing a span sender with authenticator.

codefromthecrypt commented 4 years ago

@DarwinSin you shouldn't call build on the clientBuilder(). just add the authenticator..

ex senderBuilder = OKHttpSender.builder... senderBuilder.clientBuilder().authenticator(myAuthenticator); sender = senderBuilder.build();