use of io.crnk.monitor.brave.internal.OkHttpBraveIntegration 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