Remove deprecated getFlavor() methods from HTTP getters (#8497)

This commit is contained in:
Mateusz Rzeszutek 2023-05-16 21:01:19 +02:00 committed by GitHub
parent 28cf44cef4
commit 9f13e85f72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 37 deletions

View File

@ -5,9 +5,6 @@
package io.opentelemetry.instrumentation.api.instrumenter.http;
import io.opentelemetry.context.Context;
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesGetter;
import javax.annotation.Nullable;
/**
@ -20,25 +17,6 @@ import javax.annotation.Nullable;
public interface HttpClientAttributesGetter<REQUEST, RESPONSE>
extends HttpCommonAttributesGetter<REQUEST, RESPONSE> {
// Attributes that always exist in a request
@Nullable
String getUrl(REQUEST request);
// Attributes which are not always available when the request is ready.
/**
* Extracts the {@code http.flavor} span attribute.
*
* <p>This is called from {@link Instrumenter#end(Context, Object, Object, Throwable)}, whether
* {@code response} is {@code null} or not.
*
* @deprecated Use {@link NetClientAttributesGetter#getProtocolName(Object, Object)} and {@link
* NetClientAttributesGetter#getProtocolVersion(Object, Object)} instead.
*/
@Deprecated
@Nullable
default String getFlavor(REQUEST request, @Nullable RESPONSE response) {
return null;
}
}

View File

@ -5,7 +5,6 @@
package io.opentelemetry.instrumentation.api.instrumenter.http;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter;
import javax.annotation.Nullable;
/**
@ -18,20 +17,6 @@ import javax.annotation.Nullable;
public interface HttpServerAttributesGetter<REQUEST, RESPONSE>
extends HttpCommonAttributesGetter<REQUEST, RESPONSE> {
// Attributes that always exist in a request
/**
* Extracts the {@code http.flavor} span attribute.
*
* @deprecated Use {@link NetServerAttributesGetter#getProtocolName(Object)} and {@link
* NetServerAttributesGetter#getProtocolVersion(Object)} instead.
*/
@Deprecated
@Nullable
default String getFlavor(REQUEST request) {
return null;
}
@Nullable
String getScheme(REQUEST request);