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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
### Breaking changes

- The EclipseLink Persistence implementation has been completely removed.
- The default request ID header name has changed from `Polaris-Request-Id` to `X-Request-ID`.

### New Features

Expand Down
6 changes: 3 additions & 3 deletions getting-started/telemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ This example requires `jq` to be installed on your machine.
```

4. Then, use the access token in the Authorization header when accessing Polaris; you can also test
the `Polaris-Request-Id` header; you should see it in all logs and traces:
the `X-Request-ID` header; you should see it in all logs and traces:

```shell
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 1234"
-H "X-Request-ID: 1234"
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 5678"
-H "X-Request-ID: 5678"
```

5. Access the following services:
Expand Down
4 changes: 2 additions & 2 deletions helm/polaris/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ ct install --namespace polaris --charts ./helm/polaris
| livenessProbe.successThreshold | int | `1` | Minimum consecutive successes for the probe to be considered successful after having failed. Minimum value is 1. |
| livenessProbe.terminationGracePeriodSeconds | int | `30` | Optional duration in seconds the pod needs to terminate gracefully upon probe failure. Minimum value is 1. |
| livenessProbe.timeoutSeconds | int | `10` | Number of seconds after which the probe times out. Minimum value is 1. |
| logging | object | `{"categories":{"org.apache.iceberg.rest":"INFO","org.apache.polaris":"INFO"},"console":{"enabled":true,"format":"%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] [%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] (%t) %s%e%n","json":false,"threshold":"ALL"},"file":{"enabled":false,"fileName":"polaris.log","format":"%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] [%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] (%t) %s%e%n","json":false,"logsDir":"/deployments/logs","rotation":{"fileSuffix":null,"maxBackupIndex":5,"maxFileSize":"100Mi"},"storage":{"className":"standard","selectorLabels":{},"size":"512Gi"},"threshold":"ALL"},"level":"INFO","mdc":{},"requestIdHeaderName":"Polaris-Request-Id"}` | Logging configuration. |
| logging | object | `{"categories":{"org.apache.iceberg.rest":"INFO","org.apache.polaris":"INFO"},"console":{"enabled":true,"format":"%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] [%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] (%t) %s%e%n","json":false,"threshold":"ALL"},"file":{"enabled":false,"fileName":"polaris.log","format":"%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] [%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] (%t) %s%e%n","json":false,"logsDir":"/deployments/logs","rotation":{"fileSuffix":null,"maxBackupIndex":5,"maxFileSize":"100Mi"},"storage":{"className":"standard","selectorLabels":{},"size":"512Gi"},"threshold":"ALL"},"level":"INFO","mdc":{},"requestIdHeaderName":"X-Request-ID"}` | Logging configuration. |
| logging.categories | object | `{"org.apache.iceberg.rest":"INFO","org.apache.polaris":"INFO"}` | Configuration for specific log categories. |
| logging.console | object | `{"enabled":true,"format":"%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c{3.}] [%X{requestId},%X{realmId}] [%X{traceId},%X{parentId},%X{spanId},%X{sampled}] (%t) %s%e%n","json":false,"threshold":"ALL"}` | Configuration for the console appender. |
| logging.console.enabled | bool | `true` | Whether to enable the console appender. |
Expand All @@ -271,7 +271,7 @@ ct install --namespace polaris --charts ./helm/polaris
| logging.file.threshold | string | `"ALL"` | The log level of the file appender. |
| logging.level | string | `"INFO"` | The log level of the root category, which is used as the default log level for all categories. |
| logging.mdc | object | `{}` | Configuration for MDC (Mapped Diagnostic Context). Values specified here will be added to the log context of all incoming requests and can be used in log patterns. |
| logging.requestIdHeaderName | string | `"Polaris-Request-Id"` | The header name to use for the request ID. |
| logging.requestIdHeaderName | string | `"X-Request-ID"` | The header name to use for the request ID. |
| managementService | object | `{"annotations":{},"clusterIP":"None","externalTrafficPolicy":null,"internalTrafficPolicy":null,"ports":[{"name":"polaris-mgmt","nodePort":null,"port":8182,"protocol":null,"targetPort":null}],"sessionAffinity":null,"trafficDistribution":null,"type":"ClusterIP"}` | Management service settings. These settings are used to configure liveness and readiness probes, and to configure the dedicated headless service that will expose health checks and metrics, e.g. for metrics scraping and service monitoring. |
| managementService.annotations | object | `{}` | Annotations to add to the service. |
| managementService.clusterIP | string | `"None"` | By default, the management service is headless, i.e. it does not have a cluster IP. This is generally the right option for exposing health checks and metrics, e.g. for metrics scraping and service monitoring. |
Expand Down
2 changes: 1 addition & 1 deletion helm/polaris/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ logging:
# -- The log level of the root category, which is used as the default log level for all categories.
level: INFO
# -- The header name to use for the request ID.
requestIdHeaderName: Polaris-Request-Id
requestIdHeaderName: X-Request-ID
# -- Configuration for the console appender.
console:
# -- Whether to enable the console appender.
Expand Down
2 changes: 1 addition & 1 deletion runtime/defaults/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ polaris.event-listener.type=no-op
# polaris.event-listener.aws-cloudwatch.region=us-east-1
# polaris.event-listener.aws-cloudwatch.synchronous-mode=false

polaris.log.request-id-header-name=Polaris-Request-Id
polaris.log.request-id-header-name=X-Request-ID
# polaris.log.mdc.aid=polaris
# polaris.log.mdc.sid=polaris-service

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,20 @@ void testSuccessWithGeneratedRequestId() {
.then()
.statusCode(200)
.body(containsString("access_token"))
.header("Polaris-Request-Id", anything());
.header("X-Request-ID", anything());
verify(requestIdGenerator, times(1)).generateRequestId(any());
}

@Test
void testSuccessWithCustomRequestId() {
givenTokenRequest()
.header("Polaris-Request-Id", "custom-request-id")
.header("X-Request-ID", "custom-request-id")
.when()
.post()
.then()
.statusCode(200)
.body(containsString("access_token"))
.header("Polaris-Request-Id", "custom-request-id");
.header("X-Request-ID", "custom-request-id");
verify(requestIdGenerator, never()).generateRequestId(any());
}

Expand Down
4 changes: 2 additions & 2 deletions site/content/in-dev/unreleased/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ read-only mode, as Polaris only reads the configuration file once, at startup.
| `polaris.storage.aws.secret-key` | `secretKey` | Define the AWS S3 secret key. If unset, the default credential provider chain will be used. |
| `polaris.storage.gcp.token` | `token` | Define the Google Cloud Storage token. If unset, the default credential provider chain will be used. |
| `polaris.storage.gcp.lifespan` | `PT1H` | Define the Google Cloud Storage lifespan type. If unset, the default credential provider chain will be used. |
| `polaris.log.request-id-header-name` | `Polaris-Request-Id` | Define the header name to match request ID in the log. |
| `polaris.log.request-id-header-name` | `X-Request-ID` | Define the header name to match request ID in the log. |
| `polaris.log.mdc.aid` | `polaris` | Define the log context (e.g. MDC) AID. |
| `polaris.log.mdc.sid` | `polaris-service` | Define the log context (e.g. MDC) SID. |
| `polaris.rate-limiter.filter.type` | `no-op` | Define the Polaris rate limiter. Supported values are `no-op`, `token-bucket`. |
| `polaris.rate-limiter.token-bucket.type` | `default` | Define the token bucket rate limiter. |
| `polaris.rate-limiter.token-bucket.requests-per-second` | `9999` | Define the number of requests per second for the token bucket rate limiter. |
| `polaris.rate-limiter.token-bucket.window` | `PT10S` | Define the window type for the token bucket rate limiter. |
| `polaris.metrics.tags.<tag-name>=<tag-value>` | `application=Polaris` | Define arbitrary metric tags to include in every request. |
| `polaris.metrics.tags.<tag-name>=<tag-value>` | `application=Polaris` | Define arbitrary metric tags to include in every request. |
| `polaris.metrics.realm-id-tag.api-metrics-enabled` | `false` | Whether to enable the `realm_id` metric tag in API metrics. |
| `polaris.metrics.realm-id-tag.http-metrics-enabled` | `false` | Whether to enable the `realm_id` metric tag in HTTP request metrics. |
| `polaris.metrics.realm-id-tag.http-metrics-max-cardinality` | `100` | The maximum cardinality for the `realm_id` tag in HTTP request metrics. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ This example requires `jq` to be installed on your machine.
```

4. Then, use the access token in the Authorization header when accessing Polaris; you can also test
the `Polaris-Request-Id` header; you should see it in all logs and traces:
the `X-Request-ID` header; you should see it in all logs and traces:

```shell
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 1234"
-H "X-Request-ID: 1234"
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
-H "Authorization: Bearer $POLARIS_TOKEN" \
-H "Polaris-Request-Id: 5678"
-H "X-Request-ID: 5678"
```

5. Access the following services:
Expand Down
Loading