Remove deprecated HTTP semconv code (#7259)
This commit is contained in:
parent
27805615aa
commit
72cc791b39
|
@ -36,17 +36,6 @@ public final class HttpServerAttributesExtractor<REQUEST, RESPONSE>
|
|||
REQUEST, RESPONSE, HttpServerAttributesGetter<REQUEST, RESPONSE>>
|
||||
implements SpanKeyProvider {
|
||||
|
||||
/**
|
||||
* Creates the HTTP server attributes extractor with default configuration.
|
||||
*
|
||||
* @deprecated Use {@link #create(HttpServerAttributesGetter, NetServerAttributesGetter)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static <REQUEST, RESPONSE> HttpServerAttributesExtractor<REQUEST, RESPONSE> create(
|
||||
HttpServerAttributesGetter<REQUEST, RESPONSE> httpAttributesGetter) {
|
||||
return create(httpAttributesGetter, new NoopNetServerAttributesGetter<>());
|
||||
}
|
||||
|
||||
/** Creates the HTTP server attributes extractor with default configuration. */
|
||||
public static <REQUEST, RESPONSE> HttpServerAttributesExtractor<REQUEST, RESPONSE> create(
|
||||
HttpServerAttributesGetter<REQUEST, RESPONSE> httpAttributesGetter,
|
||||
|
@ -54,19 +43,6 @@ public final class HttpServerAttributesExtractor<REQUEST, RESPONSE>
|
|||
return builder(httpAttributesGetter, netAttributesGetter).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new {@link HttpServerAttributesExtractorBuilder} that can be used to configure the
|
||||
* HTTP client attributes extractor.
|
||||
*
|
||||
* @deprecated Use {@link #builder(HttpServerAttributesGetter, NetServerAttributesGetter)}
|
||||
* instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public static <REQUEST, RESPONSE> HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> builder(
|
||||
HttpServerAttributesGetter<REQUEST, RESPONSE> httpAttributesGetter) {
|
||||
return builder(httpAttributesGetter, new NoopNetServerAttributesGetter<>());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new {@link HttpServerAttributesExtractorBuilder} that can be used to configure the
|
||||
* HTTP client attributes extractor.
|
||||
|
@ -186,26 +162,4 @@ public final class HttpServerAttributesExtractor<REQUEST, RESPONSE>
|
|||
public SpanKey internalGetSpanKey() {
|
||||
return SpanKey.HTTP_SERVER;
|
||||
}
|
||||
|
||||
private static class NoopNetServerAttributesGetter<REQUEST>
|
||||
implements NetServerAttributesGetter<REQUEST> {
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String transport(REQUEST request) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public String hostName(REQUEST request) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Integer hostPort(REQUEST request) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,18 +30,4 @@ public interface HttpServerAttributesGetter<REQUEST, RESPONSE>
|
|||
|
||||
@Nullable
|
||||
String scheme(REQUEST request);
|
||||
|
||||
/**
|
||||
* The primary server name of the matched virtual host. This should be obtained via configuration,
|
||||
* not from the Host header. If no such configuration can be obtained, this method should return
|
||||
* {@code null}.
|
||||
*
|
||||
* @deprecated This method is deprecated and will be removed in the next release.
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
default String serverName(REQUEST request) {
|
||||
throw new UnsupportedOperationException(
|
||||
"This method is deprecated and will be removed in the next release");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,39 +20,11 @@ public interface NetClientAttributesGetter<REQUEST, RESPONSE> {
|
|||
@Nullable
|
||||
String transport(REQUEST request, @Nullable RESPONSE response);
|
||||
|
||||
/**
|
||||
* Logical remote hostname.
|
||||
*
|
||||
* @deprecated This method is deprecated and will be removed in the next release.
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
default String peerName(REQUEST request, @Nullable RESPONSE response) {
|
||||
throw new UnsupportedOperationException(
|
||||
"This method is deprecated and will be removed in the next release");
|
||||
}
|
||||
String peerName(REQUEST request);
|
||||
|
||||
@Nullable
|
||||
default String peerName(REQUEST request) {
|
||||
return peerName(request, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logical remote port number.
|
||||
*
|
||||
* @deprecated This method is deprecated and will be removed in the next release.
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
default Integer peerPort(REQUEST request, @Nullable RESPONSE response) {
|
||||
throw new UnsupportedOperationException(
|
||||
"This method is deprecated and will be removed in the next release");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
default Integer peerPort(REQUEST request) {
|
||||
return peerPort(request, null);
|
||||
}
|
||||
Integer peerPort(REQUEST request);
|
||||
|
||||
@Nullable
|
||||
default String sockFamily(REQUEST request, @Nullable RESPONSE response) {
|
||||
|
|
Loading…
Reference in New Issue