How to access an index created by APM in Kibana's custom visualization?

I need to access some custom labels sent from the front in the Dashboard --> Custom Visualization area, I'm trying to do the following code but I don't seem to get anything. In addition, I am getting a specific index from APM itself that has a specific date, the aim is to get all APM label logs.

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "title": "Gráfico de Linhas com Propriedade 'testandoAPM'",

  "data": {
    "url": {
      "index": ".ds-traces-apm.rum-default-2023.11.20-000001",
      "body": { "_source": ["labels.workspaceStringfyData"] },
      "size": 1000
    },
    "format": {"property": "hits.hits"}
  },

  "mark": "text",

 "encoding": {
    "x": {
       "field": workspaceId,
      "type": "ordinal",
      "axis": {"title": "ID"} 
    },
    "y": {
      "type": "quantitative",
      "aggregate": "count",
      "axis": {"title": "HI"}
    }
  }
}

I also noticed that if I do the filter through custom visualization, the custom property does not appear, but if I do the filter by creating a normal chart (without using custom) I can access it.

PS: My property is an array of objects, in this case I created a JSON.stringfy from the frontend for Elastic, I need to use it as an array to access the properties and assemble the graph.

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