This is an automated email from the ASF dual-hosted git repository.
singhpk234 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new e586b3a74 Rename request ID header (#2988)
e586b3a74 is described below
commit e586b3a74799fa558cf85f5b854a9a3a2f790d15
Author: Alexandre Dutra <[email protected]>
AuthorDate: Thu Nov 6 05:38:04 2025 +0100
Rename request ID header (#2988)
---
CHANGELOG.md | 1 +
getting-started/telemetry/README.md | 6 +++---
helm/polaris/README.md | 4 ++--
helm/polaris/values.yaml | 2 +-
runtime/defaults/src/main/resources/application.properties | 2 +-
.../org/apache/polaris/service/tracing/RequestIdFilterTest.java | 6 +++---
site/content/in-dev/unreleased/configuration.md | 4 ++--
.../unreleased/getting-started/using-polaris/telemetry-tools.md | 6 +++---
site/content/in-dev/unreleased/helm.md | 4 ++--
site/content/in-dev/unreleased/telemetry.md | 4 ++--
10 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53145b590..2a4d0c891 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/getting-started/telemetry/README.md
b/getting-started/telemetry/README.md
index c1bb39201..88fc1cbe4 100644
--- a/getting-started/telemetry/README.md
+++ b/getting-started/telemetry/README.md
@@ -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:
diff --git a/helm/polaris/README.md b/helm/polaris/README.md
index 22bb3f863..c00985cef 100644
--- a/helm/polaris/README.md
+++ b/helm/polaris/README.md
@@ -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", [...]
+| 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", [...]
| 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. |
@@ -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. fo [...]
| 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. |
diff --git a/helm/polaris/values.yaml b/helm/polaris/values.yaml
index 3119b8e21..db0211b9b 100644
--- a/helm/polaris/values.yaml
+++ b/helm/polaris/values.yaml
@@ -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.
diff --git a/runtime/defaults/src/main/resources/application.properties
b/runtime/defaults/src/main/resources/application.properties
index 1a1331cfd..6cccec578 100644
--- a/runtime/defaults/src/main/resources/application.properties
+++ b/runtime/defaults/src/main/resources/application.properties
@@ -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
diff --git
a/runtime/service/src/test/java/org/apache/polaris/service/tracing/RequestIdFilterTest.java
b/runtime/service/src/test/java/org/apache/polaris/service/tracing/RequestIdFilterTest.java
index ddcf5894b..daaa55464 100644
---
a/runtime/service/src/test/java/org/apache/polaris/service/tracing/RequestIdFilterTest.java
+++
b/runtime/service/src/test/java/org/apache/polaris/service/tracing/RequestIdFilterTest.java
@@ -60,20 +60,20 @@ public class RequestIdFilterTest {
.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());
}
diff --git a/site/content/in-dev/unreleased/configuration.md
b/site/content/in-dev/unreleased/configuration.md
index d27194edf..5e666d5a7 100644
--- a/site/content/in-dev/unreleased/configuration.md
+++ b/site/content/in-dev/unreleased/configuration.md
@@ -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.
[...]
diff --git
a/site/content/in-dev/unreleased/getting-started/using-polaris/telemetry-tools.md
b/site/content/in-dev/unreleased/getting-started/using-polaris/telemetry-tools.md
index b6a9e8f8e..ce6490297 100644
---
a/site/content/in-dev/unreleased/getting-started/using-polaris/telemetry-tools.md
+++
b/site/content/in-dev/unreleased/getting-started/using-polaris/telemetry-tools.md
@@ -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:
diff --git a/site/content/in-dev/unreleased/helm.md
b/site/content/in-dev/unreleased/helm.md
index f30e195da..a05688d8f 100644
--- a/site/content/in-dev/unreleased/helm.md
+++ b/site/content/in-dev/unreleased/helm.md
@@ -249,7 +249,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", [...]
+| 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", [...]
| 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. |
@@ -273,7 +273,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. fo [...]
| 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. |
diff --git a/site/content/in-dev/unreleased/telemetry.md
b/site/content/in-dev/unreleased/telemetry.md
index 8bf8df03c..d21fadeae 100644
--- a/site/content/in-dev/unreleased/telemetry.md
+++ b/site/content/in-dev/unreleased/telemetry.md
@@ -113,7 +113,7 @@
quarkus.otel.resource.attributes[1]=deployment.environment=dev
Finally, two additional span attributes are added to all request parent spans:
- `polaris.request.id`: The unique identifier of the request, if set by the
caller through the
- `Polaris-Request-Id` header.
+ `X-Request-ID` header.
- `polaris.realm`: The unique identifier of the realm. Always set (unless the
request failed because
of a realm resolution error).
@@ -168,7 +168,7 @@ Polaris uses Mapped Diagnostic Context (MDC) to enrich log
messages with additio
following MDC keys are available:
- `requestId`: The unique identifier of the request, if set by the caller
through the
- `Polaris-Request-Id` header.
+ `X-Request-ID` header.
- `realmId`: The unique identifier of the realm. Always set.
- `traceId`: The unique identifier of the trace. Present if tracing is enabled
and the message is
originating from a traced context.