Misleading ERROR message if no metrics to report
Closed this issue · 0 comments
captSL commented
I encountered a minor issue happening only if no metrics are defined. The reporter logs errors in this case because the bulk message sent to Elasticsearch does not contain any documents to index:
[metrics-elasticsearch-reporter-thread-1] [] ERROR o.e.metrics.ElasticsearchReporter - Reporting returned code 400 Bad Request: {}
This happens only if the MetricsRegistry contains no elements yet (maybe because the application has just started and metrics are added dynamically later).
I think this is only a minor issue but the error message is misleading if you try to setup the reporter.