Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1 KB

README.md

File metadata and controls

37 lines (25 loc) · 1 KB

Java Azure Application Insights Sample Application

See prerequisites of this sample.

Binding

The buildpack installs the Azure Application Insights Agent, and configures it for usage based on a Service Binding. This binding consists of a type indicating what type of service it is, and an InstrumentationKey with the Application Insight Instrumentation Key.

binding
├── type
└── InstrumentationKey

Add your instrumentation key to the binding

echo "<Instrumentation Key>" > binding/InstrumentationKey

Building

pack build applications/application-insights --env BP_JVM_VERSION=17 --volume "$(pwd)/binding:/platform/bindings/application-insights"

Running

docker run --rm --env SERVICE_BINDING_ROOT=/bindings --volume "$(pwd)/binding:/bindings/application" --tty --publish 8080:8080 applications/application-insights

Viewing

curl -s http://localhost:8080/actuator/health | jq .