Remove deprecated getFlavor() methods from HTTP getters (#8497)
This commit is contained in:
parent
28cf44cef4
commit
9f13e85f72
|
@ -5,9 +5,6 @@
|
||||||
|
|
||||||
package io.opentelemetry.instrumentation.api.instrumenter.http;
|
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;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,25 +17,6 @@ import javax.annotation.Nullable;
|
||||||
public interface HttpClientAttributesGetter<REQUEST, RESPONSE>
|
public interface HttpClientAttributesGetter<REQUEST, RESPONSE>
|
||||||
extends HttpCommonAttributesGetter<REQUEST, RESPONSE> {
|
extends HttpCommonAttributesGetter<REQUEST, RESPONSE> {
|
||||||
|
|
||||||
// Attributes that always exist in a request
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
String getUrl(REQUEST request);
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
package io.opentelemetry.instrumentation.api.instrumenter.http;
|
package io.opentelemetry.instrumentation.api.instrumenter.http;
|
||||||
|
|
||||||
import io.opentelemetry.instrumentation.api.instrumenter.net.NetServerAttributesGetter;
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,20 +17,6 @@ import javax.annotation.Nullable;
|
||||||
public interface HttpServerAttributesGetter<REQUEST, RESPONSE>
|
public interface HttpServerAttributesGetter<REQUEST, RESPONSE>
|
||||||
extends HttpCommonAttributesGetter<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
|
@Nullable
|
||||||
String getScheme(REQUEST request);
|
String getScheme(REQUEST request);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue