Skip to content

Commit c206696

Browse files
committed
update documentation + normalize case
1 parent a0d48fc commit c206696

File tree

9 files changed

+30
-25
lines changed

9 files changed

+30
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ request adding CHANGELOG notes for breaking (!) changes and possibly other secti
4040

4141
### Breaking changes
4242

43-
- The default request ID header name has changed from `Polaris-Request-Id` to `x-request-id`.
43+
- The default request ID header name has changed from `Polaris-Request-Id` to `X-Request-ID`.
4444

4545
### New Features
4646

getting-started/telemetry/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ This example requires `jq` to be installed on your machine.
4949
```
5050

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

5454
```shell
5555
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
5656
-H "Authorization: Bearer $POLARIS_TOKEN" \
57-
-H "Polaris-Request-Id: 1234"
57+
-H "X-Request-ID: 1234"
5858
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
5959
-H "Authorization: Bearer $POLARIS_TOKEN" \
60-
-H "Polaris-Request-Id: 5678"
60+
-H "X-Request-ID: 5678"
6161
```
6262

6363
5. Access the following services:

runtime/service/src/main/java/org/apache/polaris/service/tracing/TracingConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public interface TracingConfiguration {
3131
interface RequestId {
3232

3333
/** The name of the header that contains the request ID. */
34-
@WithDefault("x-request-id")
34+
@WithDefault("X-Request-ID")
3535
String headerName();
3636
}
3737
}

runtime/service/src/test/java/org/apache/polaris/service/events/listeners/inmemory/InMemoryBufferEventListenerIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void testCreateCatalogAndTable() throws IOException {
137137
try (Response response =
138138
managementApi
139139
.request("v1/catalogs")
140-
.header("x-request-id", "12345")
140+
.header("X-Request-ID", "12345")
141141
.post(Entity.json(catalog))) {
142142
assertThat(response).returns(Response.Status.CREATED.getStatusCode(), Response::getStatus);
143143
}
@@ -151,7 +151,7 @@ void testCreateCatalogAndTable() throws IOException {
151151
.put(OAuth2Properties.TOKEN, authToken)
152152
.put("warehouse", catalogName)
153153
.putAll(endpoints.extraHeaders("header."))
154-
.put("header.x-request-id", "456789")
154+
.put("header.X-Request-ID", "456789")
155155
.build());
156156

157157
SessionCatalog.SessionContext sessionContext = SessionCatalog.SessionContext.createEmpty();

runtime/service/src/test/java/org/apache/polaris/service/tracing/RequestIdFilterTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@ void testNoRequestId() {
4242
.then()
4343
.statusCode(200)
4444
.body(containsString("access_token"))
45-
.header("x-request-id", nullValue());
45+
.header("X-Request-ID", nullValue());
4646
}
4747

4848
@Test
4949
void testWithRequestId() {
5050
givenTokenRequest()
51-
.header("x-request-id", "custom-request-id")
51+
.header("X-Request-ID", "custom-request-id")
5252
.when()
5353
.post()
5454
.then()
5555
.statusCode(200)
5656
.body(containsString("access_token"))
57-
.header("x-request-id", "custom-request-id");
57+
.header("X-Request-ID", "custom-request-id");
5858
}
5959

6060
private static RequestSpecification givenTokenRequest() {

site/content/in-dev/unreleased/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,14 @@ read-only mode, as Polaris only reads the configuration file once, at startup.
153153
| `polaris.storage.aws.secret-key` | `secretKey` | Define the AWS S3 secret key. If unset, the default credential provider chain will be used. |
154154
| `polaris.storage.gcp.token` | `token` | Define the Google Cloud Storage token. If unset, the default credential provider chain will be used. |
155155
| `polaris.storage.gcp.lifespan` | `PT1H` | Define the Google Cloud Storage lifespan type. If unset, the default credential provider chain will be used. |
156-
| `polaris.log.request-id-header-name` | `Polaris-Request-Id` | Define the header name to match request ID in the log. |
156+
| `polaris.tracing.request-id.header-name` | `X-Request-ID` | Define the header name to use for the request ID. |
157157
| `polaris.log.mdc.aid` | `polaris` | Define the log context (e.g. MDC) AID. |
158158
| `polaris.log.mdc.sid` | `polaris-service` | Define the log context (e.g. MDC) SID. |
159159
| `polaris.rate-limiter.filter.type` | `no-op` | Define the Polaris rate limiter. Supported values are `no-op`, `token-bucket`. |
160160
| `polaris.rate-limiter.token-bucket.type` | `default` | Define the token bucket rate limiter. |
161161
| `polaris.rate-limiter.token-bucket.requests-per-second` | `9999` | Define the number of requests per second for the token bucket rate limiter. |
162162
| `polaris.rate-limiter.token-bucket.window` | `PT10S` | Define the window type for the token bucket rate limiter. |
163-
| `polaris.metrics.tags.<tag-name>=<tag-value>` | `application=Polaris` | Define arbitrary metric tags to include in every request. |
163+
| `polaris.metrics.tags.<tag-name>=<tag-value>` | `application=Polaris` | Define arbitrary metric tags to include in every request. |
164164
| `polaris.metrics.realm-id-tag.api-metrics-enabled` | `false` | Whether to enable the `realm_id` metric tag in API metrics. |
165165
| `polaris.metrics.realm-id-tag.http-metrics-enabled` | `false` | Whether to enable the `realm_id` metric tag in HTTP request metrics. |
166166
| `polaris.metrics.realm-id-tag.http-metrics-max-cardinality` | `100` | The maximum cardinality for the `realm_id` tag in HTTP request metrics. |

site/content/in-dev/unreleased/getting-started/using-polaris/telemetry-tools.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ This example requires `jq` to be installed on your machine.
5353
```
5454

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

5858
```shell
5959
curl -v 'http://localhost:8181/api/management/v1/principal-roles' \
6060
-H "Authorization: Bearer $POLARIS_TOKEN" \
61-
-H "Polaris-Request-Id: 1234"
61+
-H "X-Request-ID: 1234"
6262
curl -v 'http://localhost:8181/api/catalog/v1/config?warehouse=quickstart_catalog' \
6363
-H "Authorization: Bearer $POLARIS_TOKEN" \
64-
-H "Polaris-Request-Id: 5678"
64+
-H "X-Request-ID: 5678"
6565
```
6666

6767
5. Access the following services:

0 commit comments

Comments
 (0)