# Identify Java Spring boot services by its application name

**URL:** <https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428>\
**Category:** APM\
**Tags:** java\
**Created:** [June 24, 2025, 8:31am UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428 "2025-06-24T08:31:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Namita\_Jaokar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/namita_jaokar/32/104106_2.png) [@Namita\_Jaokar](https://discuss.elastic.co/u/Namita_Jaokar)\
**Post date:** [June 24, 2025, 8:31am UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/1 "2025-06-24T08:31:27Z")

</div>

Hi Team,

Below are the version details for the Elastic APM agent configuration. I have a microservice based java application and the java agent jar is attached to all the java services (.jar) under same agent name.

I need to identify the service name (or Spring boot application name property) for all the services.

As per my understanding currently the metadata provides only ephimeral id field to uniquely identify the jvm instance which is different for different services.

Is there any way i can get the application name for each java service. Any changes in the java agent code that can help me identify every service by its application name.

**Kibana version** : 8.4

**Elasticsearch version** : 8.4

**APM Server version** : 8.4

**APM Agent language and version** : Java Language with Elastic APM Agent v1.53

Best Regards,  
Namita

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [June 24, 2025, 11:52am UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/2 "2025-06-24T11:52:22Z")

</div>

Are you setting the agent name via the [service\_name](https://www.elastic.co/docs/reference/apm/agents/java/config-core#config-service-name) config option

---

<div class="post-metadata">

**Author:** ![Namita\_Jaokar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/namita_jaokar/32/104106_2.png) [@Namita\_Jaokar](https://discuss.elastic.co/u/Namita_Jaokar)\
**Post date:** [June 24, 2025, 12:17pm UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/3 "2025-06-24T12:17:25Z")

</div>

Hi @Jack_Shirazi , Yes setting service\_name in the elastic apm properties file

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [June 24, 2025, 12:37pm UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/4 "2025-06-24T12:37:13Z")

</div>

So if you've set them all to the same name, that takes precedence and that's what you'll see. How about leaving that unset and letting the agent infer the name? Does that help?

---

<div class="post-metadata">

**Author:** ![Namita\_Jaokar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/namita_jaokar/32/104106_2.png) [@Namita\_Jaokar](https://discuss.elastic.co/u/Namita_Jaokar)\
**Post date:** [June 24, 2025, 12:46pm UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/5 "2025-06-24T12:46:34Z")

</div>

haven't tried removing the service\_name property . Will check on this part to see how it goes.

Is there any other approach for this at agent code level?

Best Regards,  
Namita

---

<div class="post-metadata">

**Author:** ![Jack\_Shirazi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jack_shirazi/32/91641_2.png) [@Jack\_Shirazi](https://discuss.elastic.co/u/Jack_Shirazi)\
**Post date:** [June 24, 2025, 1:12pm UTC](https://discuss.elastic.co/t/identify-java-spring-boot-services-by-its-application-name/379428/6 "2025-06-24T13:12:47Z")

</div>

Generally the auto-detected service name is useful enough, or the deployment environment can explicitly set a service name per service using environment variables and deployment configuration. The only other mechanism I can think of would be to use an [ingest pipeline](https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines) to transform the name based on some other metadata
