Edit feilds.yml in apm server to get country details

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) :

I am capturing country name of my application through apm labels as labels.country .
Now I am displaying system and jvm graphs and I want to limit these graphs based on country.
But when I put filter for labels.country the system and jvm maps disappears. So how can I map my labels.country to system or jvm properties .

I assume we have to create new fields like system.cpu.country or jvm.meory.country and map these to labels.coutry via pipeline inject right?

Or is there any other country filter already available for apm server's system and jvm properties which I can map to my labels.country

Hi and thanks for the question!

What is the country name of your application? Is it related to the location of the application deployment or the source of requests made to the application?
How do you set the labels and to what context (global_labels or other)?

Country name is related to the location of my application request source. Labels are set through https://www.elastic.co/guide/en/apm/get-started/current/metadata.html#labels-fields .. setting the country name on to apm transaction label. like... span.settag("","")

The metrics you are referring to are OS- or JVM-level and the labels you set are on a transaction/span/error level. What is the meaning of filtering the system CPU or JVM GC-time based on a group of transactions?

So basically each APM transactions arise from say a single application residing in a host. So I want to filter the performance of the hosts based on its location.How can I achieve that

Ahh, for that you have service_node_name since 1.11.0 of the agent, just make sure you upgrade your APM server as well (it was added in 7.5). Make sure you read the documentation notes. This would give you exactly what you want - a list of nodes in the JVMs metrics tab.

Another option is using global_labels per service instance and use the query bar.

What if we need to group the several hosts to one specific region and provide that filter as well.? The above that you mentioned is specific to hosts right?

service_node_name should be unique per JVM. That would give you the best aggregations for metrics, which contain JVM-level ones.

Still, you can use global_labels in any way you wish, meaning - apply a country label per instance, giving multiple instances the same label value where applicable.

I hope this helps.

I think you would get the best results using both

I am sorry but is this how we set it?
-Delastic.apm.global_labels=[labels.country]

Also is global_labels available for apm agent 1.9 and apm server 7.3.2 ?

Please refer to our documentation.

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