Hi,
I'm trying to integrate Elastic APM with some Java microservices running on Docker environment. These microservices are all defined inside a docker-compose YAML files
Since the application is based on Java, I downloaded the Java APM agent and I've added these java opts to each component:
-javaagent:/path/to/elastic-apm-agent.jar -Delastic.apm.service_name="name of microservice"
Some common properties between microservices such as Elastic url, secret token are defined in a elasticapm.properties which is located in the same path of the apm agent jar
The result is that the APM agent is not starting, on the logs I can see these relevant messages:
- Error: Could not find or load main class "name of the application here"
- Error in Java System Properties: Your service name ""nameofservicehere" must only contain characters from the ASCII alphabet, numbers, dashes, underscores and spaces Default value 'app' for 'service_name' will be applied.
It is worth to say that I'm not using any special character inside the name of the service, just letters, spaces and dashes.
What's wrong with my setup?
Kibana version:
7.10.2
Elasticsearch version:
7.10.2
APM Server version:
7.10.2
APM Agent language and version:
Java Elastic APM agent 1.23.0
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Official repository
Java version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (IcedTea 3.16.0) (Alpine 8.252.09-r0)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
Provide logs and/or server output (if relevant):
- Error: Could not find or load main class "name of the application here"
- Error in Java System Properties: Your service name ""nameofservicehere" must only contain characters from the ASCII alphabet, numbers, dashes, underscores and spaces Default value 'app' for 'service_name' will be applied.