Customize graph data paramters

Kibana version : 7.6

Elasticsearch version : 7.6

APM Server version : 7.3.2

APM Agent language and version : java 1.9.0

Fresh install or upgraded from other version? fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. :-----No

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant) :

In my metrics I am tracking the time taken for transactions. I am using span names in X axis as below. In order to make it more user friendly , I want to give different names for the span names . How can I change the names . Can I use the i18n support to provide English translations for these names. Instead of WORKSTATION_OPEN I just want to show RegisterOpen. So is there any way we can use the translation feature and use en.json to map the new value .

I tried to do it by putting the file path in xpack/.i18nrc.json
Also added the vaues in x-pack\plugins\translations\translations\en.json

I don't see the changes reflecting . is there any other option to achieve this .
This is how my en.json is

{
"messages": {
"WORKSTATION_OPEN": "RegisterOpen"
}
}

Do I need to map WORKSTATION_OPEN any where else

Note: I am fetching the span names from my application logs. I can create mapping in my application itself and set the new names but it is lot of data and I don't want to load a new set of data to my application . So was wondering if we can map it somewhere in Kibana .

The translation service only translates Kibana's UI, not the data that you can see in Kibana.
There is a Hashmap formatter that will allow to define mappings like the ones you want, but it will take a while to do manually.

1 Like

Thanks . Could you pls elaborate on the HashMap Formatter as to where I can access it and how can I go ahead and start the changes . I am ok with the time that it may take . But I so want to explore

There you go, it's called Static Lookup , I just forgot the name. You can screenshots on how to use it in the PR that implemented it. It should be the same path just different colors and icons in the newer versions of Kibana.

1 Like

So will this Static Look up data be also exported along with Dashboard export .

Suppose I want to create a new dashboard instance in another server with similar index pattern and I am going to import a dashboard with these static imports , will the static look ups and the mappings be retained into the imported dashboard ?

i think it should be as it's saved in the related objects (in this example that would be the index pattern). so as long as you export and import the index pattern, it should show up.

1 Like

Is there a limit to the number of static look ups that we can map ?

I didn't see one in the code, so I assume there isn't one. But if you go with too many there might be a performance degradation. If you have over 20-30 I'd say you should create another field at ingest with all the mappings.

These are the different operation names that get executed for each event that occurs. So definitely there will be more than 100 for sure. I don't understand when you say to create another field. Because the mappings are for one particular field. So how do we create another field.

You do a mapping at ingest time. Basically check if field1 is value x, you create field2 with value y.
This way you have both the mapped version and the unmapped version of the data.

1 Like

You mean to say from wherever I am creating the span , edit the names there?
That is also not feasible due to lot of data getting loaded in my application, and that's the reason why we decided to ingest it in elastic. I am assuming there will be around 3000 static look ups that I may have to set. But this is like a monitoring tool that we are creating ..so a liitle bit of slowness should be ok for the application I am assuming.. But pls let me now if you know how big of an impact in performance are we expecting with these many lookups

One more thing that I noticed is that .I logged out and logged in and all my static look ups are gone.

They shouldn't be. Did you change to another Space? Index patterns are space-dependent.

1 Like

I did not change the space.. The mappings should still be displayed under the same field correct? Its all disappeared. I had atleast 20 mappings in here and now I see only one and I remember saving them

That seems indeed weird. I will try locally and check if there's any problem.
Any changes that happened while you were logged out? Recreated the index pattern or something like that?

I saved one with a lot of values and relogged (also restarted Kibana, just in case) and it was saved properly. Can you think of any other details on what happened in order to reproduce the issue?
I was testing with 7.6.0 as well.

I also tried to reproduce , but its not happening. Will keep an eye out if I see it again

I was able to reproduce the issue of Static look ups disappearing. So here is what I did. I went to Kibana home Clicked on Add APM , Clicked on the very last button Load Kibana Objects .. Launch APM. That kind of removed my Static look ups.
I did not restart any thing else . I just clicked on Launch APM and relaunched the APM. My index pattern is apm-*.

The "Load Kibana objects" will add default APM saved objects: index patterns, visualizations and dashboards. This will rewrite any existing objects with the same name. And if you did the static lookup on the "apm-*" index pattern, that will be one that is overwritten.
So this is expected, but, you don't need to click more than once on the "Load Kibana objects". You add them once and there's no point in clicking on "Load Kibana objects" again.

I am still in development phase and I was trying to define a new tag to my span . On refreshing Kibana I couldn't see the new tag attached to the span . I even reloaded the APM page. Only after I did "Load Kibana objects" it started appearing. Pls correct me if I am wrong. So how will I make sure my code changes reflects properly.