I have a bunch of completely different, unrelated Java/Spring applications running on a cloud provider. Each application has its own service name so I can differentiate them in Elastic. Each application uses its own database running on its own MySQL database server. Each application uses the same, default naming for its MySQL database. So even though each application uses a different MySQL database, they all show up in Elastic APM's service map as if they are the same database - but they most certainly are not the same server. How do I get Elastic to show them as the different services they really are?
For example, I have applications A, B, and C. There are database servers mysql-a, mysql-b, and mysql-c. Applications A, B, and C use JDBC connection strings jdbc:mysql://mysql-a/service_instance_db
, jdbc:mysql://mysql-a/service_instance_db
, and jdbc:mysql://mysql-a/service_instance_db
respectively. That results in one service shown in the service map named mysql/service_instance_db
with A, B, C all connecting to it which is wrong. What I expected is for there to be 3 services shown in the service map, with each application connecting to only its database service (as that's what is really happening).
How do I fix this conflating issue?
Note that I cannot change the MySQL database schema/catalog names - changing all the applications to refer to new names and modifying the databases is too much effort and risk.