-
JDK 11
-
WavefrontVMware Tanzu Observability account -
Cloud Foundry environment (e.g. sign up for a free Pivotal Web Services account)
-
'cf' command-line interface for Cloud Foundry:
Follow the instructions on how to install the cf CLI using a package manager on Mac OS X and Linux operating systems here.
You can install the cf CLI using a compressed binary on Windows, Mac OS X, and Linux operating systems here.
Log in to the cf CLI targeting your environment. E.g.
cf login -a https://api.run.pivotal.io
- Push the Docker container to CF with an internal route
cf push wavefront-proxy --docker-image wavefronthq/proxy:latest --no-start -d apps.internal
- Change the type of the healthcheck
cf set-health-check wavefront-proxy process
- Login to
WavefrontVMware Tanzu Observability, navigate to Browse → Proxies and click on Add new proxy. Select Docker in the How to Add a Proxy section and set replace the values of the ENV variables in the following commands with yourscf set-env wavefront-proxy WAVEFRONT_URL "YOUR_WAVEFRONT_URL" cf set-env wavefront-proxy WAVEFRONT_TOKEN YOUR_WAVEFRONT_TOKEN
- Set the following ENV variable to activate the ZipKin integration
cf set-env wavefront-proxy WAVEFRONT_PROXY_ARGS "--traceZipkinListenerPorts 9411"
- Start the Proxy
cf start wavefront-proxy
- Switch back to
WavefrontVMware Tanzu Observability. Now the proxy should be detected. Press Done to add the proxy.
- Create a MySQL service instance with the name
mysql
cf create-service cleardb spark mysql
- Build the application
./gradlew test bootJar
- Push the application to CF
cf push --no-start
- Configure Container-to-Container Networking from the application to the deployed
WavefrontVMware Tanzu Observability proxycf add-network-policy spring-wavefront-demo --destination-app wavefront-proxy --protocol tcp --port 9411
- Set ZipKin base url to the proxy's integration endpoint (possible via application.yml, too)
cf set-env spring-wavefront-demo SPRING_ZIPKIN_BASE-URL "http://wavefront-proxy.apps.internal:9411/"
- Start the application
cf start spring-wavefront-demo
- Call the REST API to create one or more items.
curl --request POST --url https://YOUR-APP-URL/items
- Call the REST API to fetch the available items.
curl --request GET --url https://YOUR-APP-URL/items
- Switch back to
WavefrontVMware Tanzu Observability, and navigate to Applications → Traces.