How can an unique value of field can be shown in Y-axis

I'm tracking down the response times of each API call.
I'm pushing the response time as a field into an ES index.
I need to create a visualization of each API with the date histogram on X-axis and processing time (not the sum or count) in Y-axis.
The goal is to get a graph of processing time over a period of time interval. But the problem is on Y-axis the aggregation shows the metrics like count or sum or average.
But I want unique value of the processing time to be shown on Y-axis.

Hi @bharath.krishn2 -

So to make sure I understand, you aren't wanting to see the average of the response times, rather, you want to see each document's response time value represented individually on the y-axis?

In general, visualizations are only going to give you an aggregated view of the data. If you use a date histogram with sufficiently small interval, then in many cases average response time could basically be representing a single document anyway. (Depending on how far apart the timestamps are for each entry). But there isn't a way to visualize each individual document.

One hack would be add a sub bucket terms aggregation on something unique, like the _id, which would then split each time interval up into a different series per-document. But this is not going to be performant on large data sets, and I suspect it isn't what you are looking for anyway.

Does this help answer your question?



Thanks for the reply@lukeelmers .

Yes, I don't want the aggregation of a field on the Y-axis. Instead I need the actual value of the field from the document to be charted on the Y-Axis.

I tried the hack which you mentioned, but it didn't work out. There are millions of documents on the index and I'm getting memory issue in elastic search.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.