mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 17:06:53 +00:00
Get JSON metrics response code.
This commit is contained in:
1 parent
e15f3c9d2b
commit
405802c492
1 file changed
+2
-2
@@ -13,11 +13,9 @@ import com.codahale.metrics.Timer;
|
|||||||
import com.fasterxml.jackson.core.JsonEncoding;
|
import com.fasterxml.jackson.core.JsonEncoding;
|
||||||
import com.fasterxml.jackson.core.JsonFactory;
|
import com.fasterxml.jackson.core.JsonFactory;
|
||||||
import com.fasterxml.jackson.core.JsonGenerator;
|
import com.fasterxml.jackson.core.JsonGenerator;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
@@ -94,6 +92,8 @@ public class JsonMetricsReporter extends ScheduledReporter {
|
|||||||
json.close();
|
json.close();
|
||||||
|
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
|
|
||||||
|
logger.info("Metrics server response: " + connection.getResponseCode());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.warn("Error sending metrics", e);
|
logger.warn("Error sending metrics", e);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in new issue
Block a user