use of io.crnk.monitor.brave.internal.HttpClientBraveIntegration in project crnk-framework by crnk-project.
the class BraveModule method setHttpAdapter.
@Override
public void setHttpAdapter(HttpAdapter adapter) {
if (adapter instanceof OkHttpAdapter) {
OkHttpAdapter okHttpAdapter = (OkHttpAdapter) adapter;
okHttpAdapter.addListener(new OkHttpBraveIntegration(brave));
} else if (adapter instanceof HttpClientAdapter) {
HttpClientAdapter okHttpAdapter = (HttpClientAdapter) adapter;
okHttpAdapter.addListener(new HttpClientBraveIntegration(brave, spanNameProvider));
} else {
throw new IllegalArgumentException(adapter.getClass() + " not supported yet");
}
}
Aggregations