Example web app with Play 2.7
and Kamon 2.x
.
Run the app using the class play.core.server.ProdServerStart
as entry point and pass kanela agent by providing the JVM option: -javaagent:path/to/kanela-agent-{version}.jar
JVM params example for easier setting up:
-Dpidfile.path=/dev/null -javaagent:~/.ivy2/cache/io.kamon/kanela-agent/jars/kanela-agent-1.0.0-RC2.jar
While the app is running you can easily check the kamon instrumentation status by opening on your browser http://localhost:5266/
.
- Propagate HTTP headers.
- Generate new tag value if it's not provided by the request headers (implemented by class
support.kamon.HeadersPropagation
). - Expose tags on
logback
.
curl --request GET \
--url http://localhost:9000/dummy/outgoing-request \
--header 'x-custom-trace-id: cspinetta-trace-id-1' \
--header 'x-forwarded-for: cspinetta-laptop-2'
- Propagate HTTP headers in DEV mode.
- If the config requires load a class, it fails because the class loader used by Kanela can't see it
- For any another change, the new config is not visible for
kamon-instrumentation-common
.
- Return HTTP tags on response headers.