public class InfluxExporter
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
InfluxExporter(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String database,
java.lang.String retention,
boolean createDatabase)
Creates a new influx Exporter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underyling influx connection.
|
void |
export()
Fetches all metrics from OpenCensus and attempts to export them to Influx.
|
public InfluxExporter(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String database,
java.lang.String retention,
boolean createDatabase)
export();
This can be done periodically for example using ScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit).url - The http url of the influx to connect touser - the user to use when connecting to influx, can be nullpassword - the password to use when connecting to influx, can be nulldatabase - the influx database toretention - the retention policy of the database to write tocreateDatabase - if true, the exporter will create the specified database with an "autogen" policy when it connects