From 6465c7404302f0b6ac9a69889b7c37022763267f Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Sun, 8 Dec 2024 19:50:34 -0800 Subject: [PATCH] Simplify signatures --- .../DefaultHttpClientInstrumenterBuilder.java | 12 ++++-------- .../DefaultHttpServerInstrumenterBuilder.java | 12 ++++-------- .../v4_3/ApacheHttpClientTelemetryBuilder.java | 7 +++---- .../v5_2/ApacheHttpClient5TelemetryBuilder.java | 4 ++-- .../v5_2/ApacheHttpClientTelemetryBuilder.java | 7 +++---- .../v1_3/ArmeriaClientTelemetryBuilder.java | 10 ++++------ .../v1_3/ArmeriaServerTelemetryBuilder.java | 10 ++++------ .../armeria/v1_3/ArmeriaTelemetryBuilder.java | 16 ++++++---------- .../JavaHttpClientTelemetryBuilder.java | 6 ++---- .../v12_0/JettyClientTelemetryBuilder.java | 4 ++-- .../v9_2/JettyClientTelemetryBuilder.java | 4 ++-- .../ktor/v1_0/KtorServerTelemetry.kt | 4 ++-- .../ktor/v1_0/KtorServerTracing.kt | 4 ++-- .../common/AbstractKtorClientTelemetryBuilder.kt | 2 +- .../common/AbstractKtorServerTelemetryBuilder.kt | 4 ++-- .../client/AbstractKtorClientTracingBuilder.kt | 6 +++--- .../server/AbstractKtorServerTracingBuilder.kt | 8 ++++---- .../netty/v4_1/NettyClientTelemetryBuilder.java | 4 +--- .../okhttp/v3_0/OkHttpTelemetryBuilder.java | 6 ++---- .../v1_7/RatpackClientTelemetryBuilder.java | 6 ++---- .../v1_7/RatpackServerTelemetryBuilder.java | 5 ++--- .../ratpack/v1_7/RatpackTelemetryBuilder.java | 7 ++----- .../restlet/v1_1/RestletTelemetryBuilder.java | 2 +- .../restlet/v2_0/RestletTelemetryBuilder.java | 2 +- .../web/v3_1/SpringWebTelemetryBuilder.java | 6 ++---- .../SpringWebfluxClientTelemetryBuilder.java | 4 +--- .../SpringWebfluxServerTelemetryBuilder.java | 4 +--- .../v5_3/SpringWebfluxTelemetryBuilder.java | 8 ++------ .../v5_3/SpringWebMvcTelemetryBuilder.java | 4 +--- .../v6_0/SpringWebMvcTelemetryBuilder.java | 4 +--- 30 files changed, 69 insertions(+), 113 deletions(-) diff --git a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java index e74dd2e9f48c..28015cc841a2 100644 --- a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java +++ b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java @@ -50,9 +50,7 @@ public final class DefaultHttpClientInstrumenterBuilder { private final List> additionalExtractors = new ArrayList<>(); - private Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + private Function, SpanStatusExtractor> statusExtractorTransformer = Function.identity(); private final HttpClientAttributesExtractorBuilder httpAttributesExtractorBuilder; @@ -60,7 +58,7 @@ public final class DefaultHttpClientInstrumenterBuilder { private final HttpSpanNameExtractorBuilder httpSpanNameExtractorBuilder; @Nullable private final TextMapSetter headerSetter; - private Function, ? extends SpanNameExtractor> + private Function, ? extends SpanNameExtractor> spanNameExtractorTransformer = Function.identity(); private boolean emitExperimentalHttpClientMetrics = false; private Consumer> builderCustomizer = b -> {}; @@ -111,9 +109,7 @@ public DefaultHttpClientInstrumenterBuilder addAttributesExtr @CanIgnoreReturnValue public DefaultHttpClientInstrumenterBuilder setStatusExtractor( - Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + Function, SpanStatusExtractor> statusExtractor) { this.statusExtractorTransformer = statusExtractor; return this; @@ -180,7 +176,7 @@ public DefaultHttpClientInstrumenterBuilder setKnownMethods( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public DefaultHttpClientInstrumenterBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { this.spanNameExtractorTransformer = spanNameExtractorTransformer; return this; diff --git a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java index caee6c007da7..0353041dac2e 100644 --- a/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java +++ b/instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java @@ -46,16 +46,14 @@ public final class DefaultHttpServerInstrumenterBuilder { private final List> additionalExtractors = new ArrayList<>(); - private Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + private Function, SpanStatusExtractor> statusExtractorTransformer = Function.identity(); private final HttpServerAttributesExtractorBuilder httpAttributesExtractorBuilder; private final HttpSpanNameExtractorBuilder httpSpanNameExtractorBuilder; @Nullable private final TextMapGetter headerGetter; - private Function, ? extends SpanNameExtractor> + private Function, SpanNameExtractor> spanNameExtractorTransformer = Function.identity(); private final HttpServerRouteBuilder httpServerRouteBuilder; private final HttpServerAttributesGetter attributesGetter; @@ -109,9 +107,7 @@ public DefaultHttpServerInstrumenterBuilder addAttributesExtr @CanIgnoreReturnValue public DefaultHttpServerInstrumenterBuilder setStatusExtractor( - Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + Function, SpanStatusExtractor> statusExtractor) { this.statusExtractorTransformer = statusExtractor; return this; @@ -179,7 +175,7 @@ public DefaultHttpServerInstrumenterBuilder setKnownMethods( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public DefaultHttpServerInstrumenterBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { this.spanNameExtractorTransformer = spanNameExtractorTransformer; return this; diff --git a/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientTelemetryBuilder.java b/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientTelemetryBuilder.java index c2d3b715361e..98c628b6acdc 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientTelemetryBuilder.java +++ b/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientTelemetryBuilder.java @@ -57,8 +57,7 @@ public ApacheHttpClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor - attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -125,8 +124,8 @@ public ApacheHttpClientTelemetryBuilder setEmitExperimentalHttpClientMetrics( @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder setSpanNameExtractor( Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + SpanNameExtractor, + SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClient5TelemetryBuilder.java b/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClient5TelemetryBuilder.java index 889f24600b91..d340d7a60ae6 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClient5TelemetryBuilder.java +++ b/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClient5TelemetryBuilder.java @@ -112,8 +112,8 @@ public ApacheHttpClient5TelemetryBuilder setEmitExperimentalHttpClientMetrics( @CanIgnoreReturnValue public ApacheHttpClient5TelemetryBuilder setSpanNameExtractor( Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + SpanNameExtractor, + SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClientTelemetryBuilder.java b/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClientTelemetryBuilder.java index d0911db28cdd..e6b1f966c337 100644 --- a/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClientTelemetryBuilder.java +++ b/instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClientTelemetryBuilder.java @@ -42,8 +42,7 @@ public final class ApacheHttpClientTelemetryBuilder { */ @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor - attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -93,8 +92,8 @@ public ApacheHttpClientTelemetryBuilder setKnownMethods(Set knownMethods @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder setSpanNameExtractor( Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + SpanNameExtractor, + SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaClientTelemetryBuilder.java b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaClientTelemetryBuilder.java index 7d8cd00b291a..a98b7e928935 100644 --- a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaClientTelemetryBuilder.java +++ b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaClientTelemetryBuilder.java @@ -41,8 +41,8 @@ public final class ArmeriaClientTelemetryBuilder { @CanIgnoreReturnValue public ArmeriaClientTelemetryBuilder setStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { builder.setStatusExtractor(statusExtractor); return this; @@ -54,7 +54,7 @@ public ArmeriaClientTelemetryBuilder setStatusExtractor( */ @CanIgnoreReturnValue public ArmeriaClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -103,9 +103,7 @@ public ArmeriaClientTelemetryBuilder setKnownMethods(Set knownMethods) { /** Sets custom client {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public ArmeriaClientTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { builder.setSpanNameExtractor(clientSpanNameExtractor); return this; diff --git a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaServerTelemetryBuilder.java b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaServerTelemetryBuilder.java index 613898bdad9a..8526c27f1bb3 100644 --- a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaServerTelemetryBuilder.java +++ b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaServerTelemetryBuilder.java @@ -39,8 +39,8 @@ public final class ArmeriaServerTelemetryBuilder { @CanIgnoreReturnValue public ArmeriaServerTelemetryBuilder setStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { builder.setStatusExtractor(statusExtractor); return this; @@ -52,7 +52,7 @@ public ArmeriaServerTelemetryBuilder setStatusExtractor( */ @CanIgnoreReturnValue public ArmeriaServerTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -101,9 +101,7 @@ public ArmeriaServerTelemetryBuilder setKnownMethods(Set knownMethods) { /** Sets custom server {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public ArmeriaServerTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> serverSpanNameExtractor) { builder.setSpanNameExtractor(serverSpanNameExtractor); return this; diff --git a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaTelemetryBuilder.java b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaTelemetryBuilder.java index 5a900eb95c8c..1f424edbe7cf 100644 --- a/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaTelemetryBuilder.java +++ b/instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaTelemetryBuilder.java @@ -69,8 +69,8 @@ public ArmeriaTelemetryBuilder setStatusExtractor( @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setClientStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { clientBuilder.setStatusExtractor(statusExtractor); return this; @@ -85,8 +85,8 @@ public ArmeriaTelemetryBuilder setClientStatusExtractor( @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setServerStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { serverBuilder.setStatusExtractor(statusExtractor); return this; @@ -270,9 +270,7 @@ public ArmeriaTelemetryBuilder setEmitExperimentalHttpServerMetrics( @Deprecated @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -286,9 +284,7 @@ public ArmeriaTelemetryBuilder setClientSpanNameExtractor( @Deprecated @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setServerSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> serverSpanNameExtractor) { serverBuilder.setSpanNameExtractor(serverSpanNameExtractor); return this; diff --git a/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/JavaHttpClientTelemetryBuilder.java b/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/JavaHttpClientTelemetryBuilder.java index 3c9c15143e3b..7817499ca28c 100644 --- a/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/JavaHttpClientTelemetryBuilder.java +++ b/instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/JavaHttpClientTelemetryBuilder.java @@ -55,7 +55,7 @@ public JavaHttpClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public JavaHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor> attributesExtractor) { + AttributesExtractor> attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -121,9 +121,7 @@ public JavaHttpClientTelemetryBuilder setEmitExperimentalHttpClientMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public JavaHttpClientTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/jetty-httpclient/jetty-httpclient-12.0/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v12_0/JettyClientTelemetryBuilder.java b/instrumentation/jetty-httpclient/jetty-httpclient-12.0/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v12_0/JettyClientTelemetryBuilder.java index cf6063511ef9..c2b30014f947 100644 --- a/instrumentation/jetty-httpclient/jetty-httpclient-12.0/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v12_0/JettyClientTelemetryBuilder.java +++ b/instrumentation/jetty-httpclient/jetty-httpclient-12.0/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v12_0/JettyClientTelemetryBuilder.java @@ -70,7 +70,7 @@ public JettyClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public JettyClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -135,7 +135,7 @@ public JettyClientTelemetryBuilder setEmitExperimentalHttpClientMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public JettyClientTelemetryBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/JettyClientTelemetryBuilder.java b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/JettyClientTelemetryBuilder.java index 4e4a9940e283..b42d55fc556c 100644 --- a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/JettyClientTelemetryBuilder.java +++ b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v9_2/JettyClientTelemetryBuilder.java @@ -70,7 +70,7 @@ public JettyClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public JettyClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -135,7 +135,7 @@ public JettyClientTelemetryBuilder setEmitExperimentalHttpClientMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public JettyClientTelemetryBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTelemetry.kt b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTelemetry.kt index d4635e557962..938e0e1ce198 100644 --- a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTelemetry.kt +++ b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTelemetry.kt @@ -45,7 +45,7 @@ class KtorServerTelemetry private constructor( } fun setStatusExtractor( - extractor: (SpanStatusExtractor) -> SpanStatusExtractor + extractor: (SpanStatusExtractor) -> SpanStatusExtractor ) { builder.setStatusExtractor { prevExtractor -> SpanStatusExtractor { spanStatusBuilder: SpanStatusBuilder, @@ -61,7 +61,7 @@ class KtorServerTelemetry private constructor( this.spanKindExtractor = extractor } - fun addAttributesExtractor(extractor: AttributesExtractor) { + fun addAttributesExtractor(extractor: AttributesExtractor) { builder.addAttributesExtractor(extractor) } diff --git a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTracing.kt b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTracing.kt index 1073053d0639..0dd1023173c0 100644 --- a/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTracing.kt +++ b/instrumentation/ktor/ktor-1.0/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v1_0/KtorServerTracing.kt @@ -46,7 +46,7 @@ class KtorServerTracing private constructor( } fun setStatusExtractor( - extractor: (SpanStatusExtractor) -> SpanStatusExtractor + extractor: (SpanStatusExtractor) -> SpanStatusExtractor ) { builder.setStatusExtractor { prevExtractor -> SpanStatusExtractor { spanStatusBuilder: SpanStatusBuilder, @@ -62,7 +62,7 @@ class KtorServerTracing private constructor( this.spanKindExtractor = extractor } - fun addAttributeExtractor(extractor: AttributesExtractor) { + fun addAttributeExtractor(extractor: AttributesExtractor) { builder.addAttributesExtractor(extractor) } diff --git a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorClientTelemetryBuilder.kt b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorClientTelemetryBuilder.kt index f07d5c6764ed..4afdaa51a1f3 100644 --- a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorClientTelemetryBuilder.kt +++ b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorClientTelemetryBuilder.kt @@ -82,7 +82,7 @@ abstract class AbstractKtorClientTelemetryBuilder( }) } - fun spanNameExtractor(spanNameExtractorTransformer: Function, out SpanNameExtractor>) { + fun spanNameExtractor(spanNameExtractorTransformer: Function, SpanNameExtractor>) { builder.setSpanNameExtractor(spanNameExtractorTransformer) } diff --git a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorServerTelemetryBuilder.kt b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorServerTelemetryBuilder.kt index 2e042bea3fb6..0f322816b18b 100644 --- a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorServerTelemetryBuilder.kt +++ b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/AbstractKtorServerTelemetryBuilder.kt @@ -42,7 +42,7 @@ abstract class AbstractKtorServerTelemetryBuilder(private val instrumentationNam ) } - fun spanStatusExtractor(extract: SpanStatusData.(SpanStatusExtractor) -> Unit) { + fun spanStatusExtractor(extract: SpanStatusData.(SpanStatusExtractor) -> Unit) { builder.setStatusExtractor { prevExtractor -> SpanStatusExtractor { spanStatusBuilder: SpanStatusBuilder, request: ApplicationRequest, @@ -86,7 +86,7 @@ abstract class AbstractKtorServerTelemetryBuilder(private val instrumentationNam ) } - fun spanNameExtractor(spanNameExtractorTransformer: Function, out SpanNameExtractor>) { + fun spanNameExtractor(spanNameExtractorTransformer: Function, SpanNameExtractor>) { builder.setSpanNameExtractor(spanNameExtractorTransformer) } diff --git a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/client/AbstractKtorClientTracingBuilder.kt b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/client/AbstractKtorClientTracingBuilder.kt index 12bff4795102..44fd8fe8fd6c 100644 --- a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/client/AbstractKtorClientTracingBuilder.kt +++ b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/client/AbstractKtorClientTracingBuilder.kt @@ -98,10 +98,10 @@ abstract class AbstractKtorClientTracingBuilder( } @Deprecated("Please use method `attributeExtractor`") - fun addAttributesExtractors(vararg extractors: AttributesExtractor) = addAttributesExtractors(extractors.asList()) + fun addAttributesExtractors(vararg extractors: AttributesExtractor) = addAttributesExtractors(extractors.asList()) @Deprecated("Please use method `attributeExtractor`") - fun addAttributesExtractors(extractors: Iterable>) { + fun addAttributesExtractors(extractors: Iterable>) { extractors.forEach { attributeExtractor { onStart { it.onStart(attributes, parentContext, request) } @@ -175,7 +175,7 @@ abstract class AbstractKtorClientTracingBuilder( clientBuilder.setEmitExperimentalHttpClientMetrics(true) } - fun spanNameExtractor(spanNameExtractorTransformer: Function, out SpanNameExtractor>) { + fun spanNameExtractor(spanNameExtractorTransformer: Function, SpanNameExtractor>) { clientBuilder.setSpanNameExtractor(spanNameExtractorTransformer) } } diff --git a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/server/AbstractKtorServerTracingBuilder.kt b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/server/AbstractKtorServerTracingBuilder.kt index 8064f208a29b..7869938ab160 100644 --- a/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/server/AbstractKtorServerTracingBuilder.kt +++ b/instrumentation/ktor/ktor-2-common/library/src/main/kotlin/io/opentelemetry/instrumentation/ktor/v2_0/common/server/AbstractKtorServerTracingBuilder.kt @@ -46,14 +46,14 @@ abstract class AbstractKtorServerTracingBuilder(private val instrumentationName: @Deprecated("Please use method `spanStatusExtractor`") fun setStatusExtractor( - extractor: (SpanStatusExtractor) -> SpanStatusExtractor + extractor: (SpanStatusExtractor) -> SpanStatusExtractor ) { spanStatusExtractor { prevStatusExtractor -> extractor(prevStatusExtractor).extract(spanStatusBuilder, request, response, error) } } - fun spanStatusExtractor(extract: SpanStatusData.(SpanStatusExtractor) -> Unit) { + fun spanStatusExtractor(extract: SpanStatusData.(SpanStatusExtractor) -> Unit) { serverBuilder.setStatusExtractor { prevExtractor -> SpanStatusExtractor { spanStatusBuilder: SpanStatusBuilder, request: ApplicationRequest, @@ -89,12 +89,12 @@ abstract class AbstractKtorServerTracingBuilder(private val instrumentationName: } } - fun spanNameExtractor(spanNameExtractorTransformer: Function, out SpanNameExtractor>) { + fun spanNameExtractor(spanNameExtractorTransformer: Function, SpanNameExtractor>) { serverBuilder.setSpanNameExtractor(spanNameExtractorTransformer) } @Deprecated("Please use method `attributeExtractor`") - fun addAttributeExtractor(extractor: AttributesExtractor) { + fun addAttributeExtractor(extractor: AttributesExtractor) { attributeExtractor { onStart { extractor.onStart(attributes, parentContext, request) diff --git a/instrumentation/netty/netty-4.1/library/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/NettyClientTelemetryBuilder.java b/instrumentation/netty/netty-4.1/library/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/NettyClientTelemetryBuilder.java index 29a6cfe54a66..0d9704963485 100644 --- a/instrumentation/netty/netty-4.1/library/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/NettyClientTelemetryBuilder.java +++ b/instrumentation/netty/netty-4.1/library/src/main/java/io/opentelemetry/instrumentation/netty/v4_1/NettyClientTelemetryBuilder.java @@ -125,9 +125,7 @@ public NettyClientTelemetryBuilder setEmitExperimentalHttpClientMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public NettyClientTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpTelemetryBuilder.java b/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpTelemetryBuilder.java index 13aa7e220393..c5c5d12d1f95 100644 --- a/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpTelemetryBuilder.java +++ b/instrumentation/okhttp/okhttp-3.0/library/src/main/java/io/opentelemetry/instrumentation/okhttp/v3_0/OkHttpTelemetryBuilder.java @@ -55,7 +55,7 @@ public OkHttpTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public OkHttpTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -120,9 +120,7 @@ public OkHttpTelemetryBuilder setEmitExperimentalHttpClientMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public OkHttpTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackClientTelemetryBuilder.java b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackClientTelemetryBuilder.java index f2f077b76fa0..d14fec110e6c 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackClientTelemetryBuilder.java +++ b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackClientTelemetryBuilder.java @@ -37,7 +37,7 @@ public final class RatpackClientTelemetryBuilder { @CanIgnoreReturnValue public RatpackClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -86,9 +86,7 @@ public RatpackClientTelemetryBuilder setKnownMethods(Set knownMethods) { /** Sets custom client {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public RatpackClientTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { builder.setSpanNameExtractor(clientSpanNameExtractor); return this; diff --git a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackServerTelemetryBuilder.java b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackServerTelemetryBuilder.java index 20cc6201af0b..80d2dde8eb74 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackServerTelemetryBuilder.java +++ b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackServerTelemetryBuilder.java @@ -41,7 +41,7 @@ public final class RatpackServerTelemetryBuilder { */ @CanIgnoreReturnValue public RatpackServerTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -90,8 +90,7 @@ public RatpackServerTelemetryBuilder setKnownMethods(Set knownMethods) { /** Sets custom server {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public RatpackServerTelemetryBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> - serverSpanNameExtractor) { + Function, SpanNameExtractor> serverSpanNameExtractor) { builder.setSpanNameExtractor(serverSpanNameExtractor); return this; } diff --git a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackTelemetryBuilder.java b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackTelemetryBuilder.java index 47f8aa063643..643b386b3846 100644 --- a/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackTelemetryBuilder.java +++ b/instrumentation/ratpack/ratpack-1.7/library/src/main/java/io/opentelemetry/instrumentation/ratpack/v1_7/RatpackTelemetryBuilder.java @@ -188,9 +188,7 @@ public RatpackTelemetryBuilder setEmitExperimentalHttpServerMetrics( @Deprecated @CanIgnoreReturnValue public RatpackTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -204,8 +202,7 @@ public RatpackTelemetryBuilder setClientSpanNameExtractor( @Deprecated @CanIgnoreReturnValue public RatpackTelemetryBuilder setServerSpanNameExtractor( - Function, ? extends SpanNameExtractor> - serverSpanNameExtractor) { + Function, SpanNameExtractor> serverSpanNameExtractor) { serverBuilder.setSpanNameExtractor(serverSpanNameExtractor); return this; } diff --git a/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletTelemetryBuilder.java b/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletTelemetryBuilder.java index 453ab82d3c47..ecf5be10f2b3 100644 --- a/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletTelemetryBuilder.java +++ b/instrumentation/restlet/restlet-1.1/library/src/main/java/io/opentelemetry/instrumentation/restlet/v1_1/RestletTelemetryBuilder.java @@ -104,7 +104,7 @@ public RestletTelemetryBuilder setEmitExperimentalHttpServerMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public RestletTelemetryBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/RestletTelemetryBuilder.java b/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/RestletTelemetryBuilder.java index 32a6421d5118..17723e1381c4 100644 --- a/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/RestletTelemetryBuilder.java +++ b/instrumentation/restlet/restlet-2.0/library/src/main/java/io/opentelemetry/instrumentation/restlet/v2_0/RestletTelemetryBuilder.java @@ -104,7 +104,7 @@ public RestletTelemetryBuilder setEmitExperimentalHttpServerMetrics( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public RestletTelemetryBuilder setSpanNameExtractor( - Function, ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebTelemetryBuilder.java b/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebTelemetryBuilder.java index cc4d69fbad19..1d38ae7a66ec 100644 --- a/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebTelemetryBuilder.java +++ b/instrumentation/spring/spring-web/spring-web-3.1/library/src/main/java/io/opentelemetry/instrumentation/spring/web/v3_1/SpringWebTelemetryBuilder.java @@ -63,7 +63,7 @@ public SpringWebTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public SpringWebTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -93,9 +93,7 @@ public SpringWebTelemetryBuilder setCapturedResponseHeaders(List respons /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractorTransformer) { builder.setSpanNameExtractor(spanNameExtractorTransformer); return this; diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxClientTelemetryBuilder.java b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxClientTelemetryBuilder.java index 3c99207b9f8d..7a3b053cf685 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxClientTelemetryBuilder.java +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxClientTelemetryBuilder.java @@ -97,9 +97,7 @@ public SpringWebfluxClientTelemetryBuilder setKnownMethods(Set knownMeth /** Sets custom client {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebfluxClientTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { builder.setSpanNameExtractor(clientSpanNameExtractor); return this; diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxServerTelemetryBuilder.java b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxServerTelemetryBuilder.java index b00dec6ffefb..1471978bc693 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxServerTelemetryBuilder.java +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxServerTelemetryBuilder.java @@ -98,9 +98,7 @@ public SpringWebfluxServerTelemetryBuilder setKnownMethods(Set knownMeth /** Sets custom server {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebfluxServerTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> serverSpanNameExtractor) { builder.setSpanNameExtractor(serverSpanNameExtractor); return this; diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxTelemetryBuilder.java b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxTelemetryBuilder.java index 678f83608a22..713f5b6cac36 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxTelemetryBuilder.java +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webflux/v5_3/SpringWebfluxTelemetryBuilder.java @@ -209,9 +209,7 @@ public SpringWebfluxTelemetryBuilder setEmitExperimentalHttpServerTelemetry( @Deprecated @CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -226,9 +224,7 @@ public SpringWebfluxTelemetryBuilder setClientSpanNameExtractor( @Deprecated @CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setServerSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> serverSpanNameExtractor) { serverBuilder.setSpanNameExtractor(serverSpanNameExtractor); return this; diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java index b2f6c63785e4..c1a406ec2e56 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v5_3/SpringWebMvcTelemetryBuilder.java @@ -78,9 +78,7 @@ public SpringWebMvcTelemetryBuilder setCapturedResponseHeaders(List resp /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebMvcTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractor) { builder.setSpanNameExtractor(spanNameExtractor); return this; diff --git a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java index bc5df58458f3..ad8b6cff81b0 100644 --- a/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java +++ b/instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library/src/main/java/io/opentelemetry/instrumentation/spring/webmvc/v6_0/SpringWebMvcTelemetryBuilder.java @@ -77,9 +77,7 @@ public SpringWebMvcTelemetryBuilder setCapturedResponseHeaders(List resp /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebMvcTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractor) { builder.setSpanNameExtractor(spanNameExtractor); return this;