elastic/elasticsearch-metrics-reporter-java

updating the existing document instead of creating a new one each time

Opened this issue · 0 comments

Hi,
Is there a reason that for each report a new document for a given metrics is created? e.g. if I have a meter with name "search-requests" - shouldn't the report update the numbers on the same document which has name = "search-requests" which would essentially be the real metrics over time, instead of creating a new document every time? I see that currently, the reporter creates a new document for each metrics everytime the report is called, and therefore the number of documents in the index will grow linearly with time?
It would be nice, if we had a better control over the decision whether to update the document in elastic search if it already exists for a given metrics, instead of creating a new document everytime.