Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions getting-started/telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ This example requires `jq` to be installed on your machine.
2. Start the docker compose group by running the following command from the root of the repository:

```shell
export ASSETS_PATH=$(pwd)/getting-started/assets/
export CLIENT_ID=root
export CLIENT_SECRET=s3cr3t
docker compose -f getting-started/telemetry/docker-compose.yml up
```

3. To access Polaris from the host machine, first request an access token:

```shell
export POLARIS_TOKEN=$(curl -s http://polaris:8181/api/catalog/v1/oauth/tokens \
--resolve polaris:8181:127.0.0.1 \
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)
Expand All @@ -50,10 +52,10 @@ This example requires `jq` to be installed on your machine.
the `Polairs-Request-Id` header; you should see it in all logs and traces:

```shell
curl -v http://127.0.0.1:8181/api/management/v1/principal-roles \
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 1234"
curl -v http://127.0.0.1:8181/api/catalog/v1/config?warehouse=polaris_demo \
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 5678"
```
Expand Down
11 changes: 9 additions & 2 deletions getting-started/telemetry/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ services:
jaeger:
condition: service_healthy
environment:
POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,root,s3cr3t
POLARIS_BOOTSTRAP_CREDENTIALS: POLARIS,${CLIENT_ID},${CLIENT_SECRET}
quarkus.otel.exporter.otlp.endpoint: http://jaeger:4317
# Resource attributes (added to all traces)
quarkus.otel.resource.attributes[0]: polaris.app=polaris-getting-started
quarkus.otel.resource.attributes[1]: polaris.env=dev

polaris.features."ALLOW_INSECURE_STORAGE_TYPES": "true"
polaris.features."SUPPORTED_CATALOG_STORAGE_TYPES": "[\"FILE\",\"S3\",\"GCS\",\"AZURE\"]"
polaris.readiness.ignore-severe-issues: "true"
# Custom metrics (added to all requests)
polaris.metrics.tags.app: polaris-getting-started
polaris.metrics.tags.env: dev
Expand All @@ -55,8 +59,11 @@ services:
depends_on:
polaris:
condition: service_healthy
environment:
- CLIENT_ID=${CLIENT_ID}
- CLIENT_SECRET=${CLIENT_SECRET}
volumes:
- ../assets/polaris/:/polaris
- ${ASSETS_PATH}/polaris/:/polaris
entrypoint: '/bin/sh -c "chmod +x /polaris/create-catalog.sh && /polaris/create-catalog.sh"'

prometheus:
Expand Down
Loading