This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
You can run your application in dev mode that enables live coding using:
./mvnw compile quarkus:devNOTE: Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
This application is instrumented with OpenTelemetry and exposes metrics in Prometheus format.
Once the application is running, metrics are available at:
http://localhost:8080/q/metrics
For more information about the metrics provided by OpenTelemetry please visit https://github.com/quarkusio/quarkus/blob/main/docs/src/main/asciidoc/opentelemetry-metrics.adoc To expose custom LRA coordinator metrics it is possible to create a REST resource as described in the just mentioned Quarkus doc.
To view metrics in your browser or with curl:
curl http://localhost:8080/q/metricsTo scrape metrics with Prometheus, add the following job to your prometheus.yml:
scrape_configs:
- job_name: 'lra-coordinator'
metrics_path: '/q/metrics'
static_configs:
- targets: ['localhost:8080']The application is configured with:
- Service name:
lra-coordinator - Traces enabled: Yes
- Metrics enabled: Yes
Additional OpenTelemetry configuration can be modified in src/main/resources/application.properties.
For a fully integrated observability stack in dev mode (Grafana, Loki, Tempo, Prometheus), you can add the following dependency to your pom.xml:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-observability-devservices-lgtm</artifactId>
<scope>provided</scope>
</dependency>This will automatically start a Grafana LGTM container when running in dev mode, giving you access to a pre-configured Grafana dashboard to visualize metrics, logs, and traces.
The application can be packaged using:
./mvnw packageIt produces the quarkus-run.jar file in the target/quarkus-app/ directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/quarkus-app/lib/ directory.
The application is now runnable using java -jar target/quarkus-app/quarkus-run.jar.
If you want to build an über-jar, execute the following command:
./mvnw package -Dquarkus.package.type=uber-jarThe application, packaged as an über-jar, is now runnable using java -jar target/*-runner.jar.
You can create a native executable using:
./mvnw package -PnativeOr, if you don't have GraalVM installed, you can run the native executable build in a container using:
./mvnw package -Pnative -Dquarkus.native.container-build=trueYou can then execute your native executable with: ./target/lra-coordinator-quarkus-1.0.0-SNAPSHOT-runner
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.
Easily start your Reactive RESTful Web Services