Package org.dhatim.dropwizard.prometheus
Interface PrometheusSender
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
Pushgateway
public interface PrometheusSender extends Closeable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect()Connects to the server.voidflush()Flushes buffer, if applicablebooleanisConnected()Returns true if ready to send datavoidsendCounter(String name, com.codahale.metrics.Counter counter)voidsendGauge(String name, com.codahale.metrics.Gauge<?> gauge)voidsendHistogram(String name, com.codahale.metrics.Histogram histogram)voidsendMeter(String name, com.codahale.metrics.Meter meter)voidsendTimer(String name, com.codahale.metrics.Timer timer)
-
-
-
Method Detail
-
connect
void connect() throws IllegalStateException, IOExceptionConnects to the server.- Throws:
IllegalStateException- if the client is already connectedIOException- if there is an error connecting
-
sendGauge
void sendGauge(String name, com.codahale.metrics.Gauge<?> gauge) throws IOException
- Throws:
IOException
-
sendCounter
void sendCounter(String name, com.codahale.metrics.Counter counter) throws IOException
- Throws:
IOException
-
sendHistogram
void sendHistogram(String name, com.codahale.metrics.Histogram histogram) throws IOException
- Throws:
IOException
-
sendMeter
void sendMeter(String name, com.codahale.metrics.Meter meter) throws IOException
- Throws:
IOException
-
sendTimer
void sendTimer(String name, com.codahale.metrics.Timer timer) throws IOException
- Throws:
IOException
-
flush
void flush() throws IOExceptionFlushes buffer, if applicable- Throws:
IOException- if there is an error connecting
-
isConnected
boolean isConnected()
Returns true if ready to send data- Returns:
- connection status
-
-