omergertel / pyformance

Performance metrics, based on Coda Hale's Yammer metrics
Other
195 stars 72 forks source link

Autocreate Influx database on metrics push #32

Closed jerluc closed 7 years ago

jerluc commented 7 years ago

This is a small feature addition that will autocreate the InfluxDB database used by the registry instance the first time metrics are pushed. The database is constructed per the registry configuration (server, port, protocol, database name, etc.).

If database creation fails the first time, it will be retried until a successful HTTP response comes back.

This feature should be safe for multiple use, as trying to create a pre-existing database has no net side effects on InfluxDB itself.

Lastly, this change makes the reporter continue even with failures, by logging out warnings rather than throwing RuntimeErrors and crashing the program.

omergertel commented 7 years ago

Thanks!