Lens is showing lines without values

I have a lens that I'm using to show custom metrics from Elastic APM, like jvm.jmx.banana. I haven't found good docs explaining breakdown, but it appears to be similar to the SQL "group by" clause, which is what I want.

I'm using the breakdown to separate the lines on the graph by service.node.name and labels.name or labels.type, which are two values created for any custom JMX metric. However my graph is showing lines for service.node.name+labels.name for documents that don't have my selected metric at all but do have service.node.name and labels.name. For example, some Java memory and GC metrics have labels.name, so there is a line on the graph for them, even if they don't have the metric I'm trying to visualize.

I want to exclude docs that don't have the metric I'm trying to graph. There is checkbox for "Include documents without the selected field" but it's deselected.

thanks

Hi @johngregg

Are you able to share an example of what you are looking to achieve?

However my graph is showing lines for service.node.name+labels.name for documents that don't have my selected metric at all but do have service.node.name and labels.name.

That does not sound correct.

LOL, it doesn't sound correct to me, either.

Collapsed for easier reading, a common doc with java GC data looks like this:

{
  "service.node.name":"myappnode1",
  "jvm.gc.count":42,
  "labels.name":"G1 Young Generation"
}

My custom JMX doc looks like this:

{
  "service.node.name":"myappnode1",
  "jvm.jmx.banana":99,
  "labels.name":"mymbeanname"
}

I want my graph to show one line of jvm.jmx.banana for each service.node.name/labels.name combination: "myappnode1 mymbeanname," "myappnode2 mymbeanname," etc.

But the legend also shows "myappnode1 G1 Young Generation," "myappnode2 G1 Young Generation," etc. The GC docs don't have jvm.jmx.banana, so I don't want them to display.

thanks

Ah ok, I see now.
Then you probably need to define a filter with jvm.jmx.banana: * which ensures to filter for the visualization only documents that have the jvm.jmx.banana property defined.

Thanks. That did work but it seems that should happen automatically. If I say I want to display x, why would the graph consider docs that don't contain x?

I would say that this can be better explained but I think it is fair to not make "smart" assumptions about data when searching/aggregating, rather provide the user the ability to control its search flow.
Providing the power to the user to decide, like applying a filter in this case, makes it possible to have full control over the data analysis.

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