Remove old experimental properties in CapturedHttpHeaders (#5524)

This commit is contained in:
Mateusz Rzeszutek 2022-03-08 09:54:06 +01:00 committed by GitHub
parent 9904352ef6
commit be79dde0f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 24 deletions

View File

@ -39,12 +39,6 @@ public abstract class CapturedHttpHeaders {
private static final String CLIENT_RESPONSE_PROPERTY =
"otel.instrumentation.http.capture-headers.client.response";
// TODO: remove the experimental properties after 1.8.0 release
private static final String EXPERIMENTAL_CLIENT_REQUEST_PROPERTY =
"otel.instrumentation.common.experimental.capture-http-headers.client.request";
private static final String EXPERIMENTAL_CLIENT_RESPONSE_PROPERTY =
"otel.instrumentation.common.experimental.capture-http-headers.client.response";
/**
* Returns a configuration that captures HTTP client request and response headers as configured in
* the received {@code config}.
@ -52,12 +46,8 @@ public abstract class CapturedHttpHeaders {
public static CapturedHttpHeaders client(Config config) {
// fall back to the experimental properties if the stable one isn't supplied
return CapturedHttpHeaders.create(
config.getList(
CLIENT_REQUEST_PROPERTY,
config.getList(EXPERIMENTAL_CLIENT_REQUEST_PROPERTY, emptyList())),
config.getList(
CLIENT_RESPONSE_PROPERTY,
config.getList(EXPERIMENTAL_CLIENT_RESPONSE_PROPERTY, emptyList())));
config.getList(CLIENT_REQUEST_PROPERTY, emptyList()),
config.getList(CLIENT_RESPONSE_PROPERTY, emptyList()));
}
private static final String SERVER_REQUEST_PROPERTY =
@ -65,12 +55,6 @@ public abstract class CapturedHttpHeaders {
private static final String SERVER_RESPONSE_PROPERTY =
"otel.instrumentation.http.capture-headers.server.response";
// TODO: remove the experimental properties after 1.8.0 release
private static final String EXPERIMENTAL_SERVER_REQUEST_PROPERTY =
"otel.instrumentation.common.experimental.capture-http-headers.server.request";
private static final String EXPERIMENTAL_SERVER_RESPONSE_PROPERTY =
"otel.instrumentation.common.experimental.capture-http-headers.server.response";
/**
* Returns a configuration that captures HTTP server request and response headers as configured in
* the received {@code config}.
@ -78,12 +62,8 @@ public abstract class CapturedHttpHeaders {
public static CapturedHttpHeaders server(Config config) {
// fall back to the experimental properties if the stable one isn't supplied
return CapturedHttpHeaders.create(
config.getList(
SERVER_REQUEST_PROPERTY,
config.getList(EXPERIMENTAL_SERVER_REQUEST_PROPERTY, emptyList())),
config.getList(
SERVER_RESPONSE_PROPERTY,
config.getList(EXPERIMENTAL_SERVER_RESPONSE_PROPERTY, emptyList())));
config.getList(SERVER_REQUEST_PROPERTY, emptyList()),
config.getList(SERVER_RESPONSE_PROPERTY, emptyList()));
}
/**