Set service environment from apm-server.yml

Hi,

I have elk stack 7.11.1 setup with apm as central server.
Have configured apm for java microservice and getting data in elasticsearch properly.
Have 2 questions

  1. I haven't set service environment variable in agent config and want to do it on central server. I have tried following.

    apm-server.default_service_environment: "Production"

  2. I will be having multiple microservices for multiple applications so will like to create a field application : value when service.name contains some string.

Thanks and Regards,
Bryce Fernandes.

Hi @Bryce_Fernandes
what do you mean by " create a field application : value" ?

Hi @nugusbayevkk ,

So I have an application with 40 microservices. Application name is Instaclaim.
Now in apm tab I can get 40 microservices by 40 names. What I want to do is create a field "Application_name": "Instaclaim" , "Application_name": "ESB".

This should be created after matching part of string present in service.name.

Regards,
Bryce Fernandes.

  1. I haven't set service environment variable in agent config and want to do it on central server. I have tried following. apm-server.default_service_environment: "Production"

That is the way to do it. The apm-server.default_service_environment config was introduced in 7.13.0, which was just released last week, so you would need to upgrade.

  1. I will be having multiple microservices for multiple applications so will like to create a field application : value when service.name contains some string.

At the moment we don't have any configuration to do this centrally, though it sounds like a good feature request -- associating services with business applications.

You have at least two options that I can think of:

1 Like

Hi @axw ,

Thanks for replying to my topic once again. Hope you are doing good.

I have tried the 2nd approach and has worked as of now will try first as well.

Thanks,
Bryce Fernandes.

1 Like

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