IMPORTANT: Developer documentation for the current main branch. This content is unreleased and may change before the next Polaris release. For stable user documentation, see the latest release docs.

Getting Started with Apache Polaris, Prometheus and Jaeger

This example requires jq to be installed on your machine.

  1. Build the Polaris image if it’s not already present locally:

    1./gradlew \
    2  :polaris-server:assemble \
    3  :polaris-server:quarkusAppPartsBuild --rerun \
    4  -Dquarkus.container-image.build=true
    
  2. Start the docker compose group by running the following command from the root of the repository:

    1docker compose -f getting-started/telemetry/docker-compose.yml up
    
  3. To access Polaris from the host machine, first request an access token:

    1export POLARIS_TOKEN=$(curl -s http://localhost:8181/api/catalog/v1/oauth/tokens \
    2   --user root:s3cr3t \
    3   -d 'grant_type=client_credentials' \
    4   -d 'scope=PRINCIPAL_ROLE:ALL' | jq -r .access_token)
    
  4. Then, use the access token in the Authorization header when accessing Polaris; you can also test the X-Request-ID header; you should see it in all logs and traces:

    1curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
    2  -H "Authorization: Bearer $POLARIS_TOKEN" \
    3  -H "X-Request-ID: 1234"
    4curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
    5  -H "Authorization: Bearer $POLARIS_TOKEN" \
    6  -H "X-Request-ID: 5678"
    
  5. Access the following services:

    • Prometheus UI: browse to http://localhost:9093 to view metrics.
    • Jaeger UI: browse to http://localhost:16686 to view traces.