package org.sonar.server.telemetry;
-import com.google.common.base.Throwables;
import java.io.IOException;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
this.config = config;
}
- void send(String json) {
- try {
- Request request = buildHttpRequest(json);
- okHttpClient.newCall(request).execute();
- } catch (IOException e) {
- Throwables.propagate(e);
- }
+ void send(String json) throws IOException {
+ Request request = buildHttpRequest(json);
+ okHttpClient.newCall(request).execute();
}
void optOut(String json) {
telemetryClient.send(json.toString());
internalProperties.write(I_PROP_LAST_PING, String.valueOf(startOfDay(now)));
} catch (Exception e) {
- // fail silently
+ LOG.debug("Error while checking SonarQube statistics: {}", e.getMessage());
}
// do not check at start up to exclude test instance which are not up for a long time
}, frequencyInSeconds, frequencyInSeconds, TimeUnit.SECONDS);