Getting Started with Apache Polaris, Prometheus and Jaeger
ℹ️ Assets for this guide can be accessed from the Apache Polaris Git repository
This example requires jq to be installed on your machine.
Build the Polaris image if it’s not already present locally:
./gradlew \ :polaris-server:assemble \ :polaris-server:quarkusAppPartsBuild --rerun \ -Dquarkus.container-image.build=trueStart the docker compose group by running the following command from the root of the repository:
export ASSETS_PATH=$(pwd)/site/content/guides/assets/ export CLIENT_ID=root export CLIENT_SECRET=s3cr3t docker compose -f site/content/guides/telemetry/docker-compose.yml upTo access Polaris from the host machine, first request an access token:
export POLARIS_TOKEN=$(curl -s http://localhost:8181/api/catalog/v1/oauth/tokens \ --user root:s3cr3t \ -d 'grant_type=client_credentials' \ -d 'scope=PRINCIPAL_ROLE:ALL' | jq -r .access_token)Then, use the access token in the Authorization header when accessing Polaris; you can also test the
X-Request-IDheader; you should see it in all logs and traces:curl -v 'http://localhost:8181/api/management/v1/principal-roles' \ -H "Authorization: Bearer $POLARIS_TOKEN" \ -H "X-Request-ID: 1234" curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \ -H "Authorization: Bearer $POLARIS_TOKEN" \ -H "X-Request-ID: 5678"Access the following services:
- Prometheus UI: browse to http://localhost:9093 to view metrics.
- Jaeger UI: browse to http://localhost:16686 to view traces.