How can I tell the java agent to use CloudFoundry environment variables to build the service.node.name? For example, I would like my node name to be something like ${vcap.application.name}-${instance_index}. In other words, the nodes would be myApp-0, myApp-1, etc.
I understand that I probably need to set the node name in my user-defined service, but I don't know how to refer to environment variables there.
I'm using the buildpack approach to initialization.
or something like that... I would try first by overriding the service.name with something static, then work on the env vars... unfortunately, I do not have a CF foundation anymore to test on...
You're mixing service.name and service.node.name. I'm talking about node name. Service name would be myApp and node names would be myApp-0, myApp-1, etc. I want the node names to show in the APM app as something human readable and not the default host name. In CloudFoundry, the host name is a guid.
I think this is probably more of a CF question about how to use environment variables.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.