From a34694a6a0583572beee8fd00cdbed9578571177 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 a7929ae56eba..980d78347379 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 6b12403f779e..6c44b8b99b10 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 03c68850845c..1581090857e4 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 @@ -56,8 +56,7 @@ public ApacheHttpClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor - attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -126,8 +125,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 e66486beec04..a80484ae3d13 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 @@ -41,8 +41,7 @@ public final class ApacheHttpClientTelemetryBuilder { */ @CanIgnoreReturnValue public ApacheHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor - attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -94,8 +93,8 @@ public ApacheHttpClientTelemetryBuilder setKnownMethods(Collection known @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 eaec86093bea..487d25c3519e 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 @@ -40,8 +40,8 @@ public final class ArmeriaClientTelemetryBuilder { @CanIgnoreReturnValue public ArmeriaClientTelemetryBuilder setStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { builder.setStatusExtractor(statusExtractor); return this; @@ -53,7 +53,7 @@ public ArmeriaClientTelemetryBuilder setStatusExtractor( */ @CanIgnoreReturnValue public ArmeriaClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -104,9 +104,7 @@ public ArmeriaClientTelemetryBuilder setKnownMethods(Collection knownMet /** 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 133f11815967..343396049791 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 @@ -38,8 +38,8 @@ public final class ArmeriaServerTelemetryBuilder { @CanIgnoreReturnValue public ArmeriaServerTelemetryBuilder setStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { builder.setStatusExtractor(statusExtractor); return this; @@ -51,7 +51,7 @@ public ArmeriaServerTelemetryBuilder setStatusExtractor( */ @CanIgnoreReturnValue public ArmeriaServerTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -102,9 +102,7 @@ public ArmeriaServerTelemetryBuilder setKnownMethods(Collection knownMet /** 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 f79adf085e66..8912842a0464 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 @@ -70,8 +70,8 @@ public ArmeriaTelemetryBuilder setStatusExtractor( @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setClientStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { clientBuilder.setStatusExtractor(statusExtractor); return this; @@ -86,8 +86,8 @@ public ArmeriaTelemetryBuilder setClientStatusExtractor( @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setServerStatusExtractor( Function< - SpanStatusExtractor, - ? extends SpanStatusExtractor> + SpanStatusExtractor, + SpanStatusExtractor> statusExtractor) { serverBuilder.setStatusExtractor(statusExtractor); return this; @@ -275,9 +275,7 @@ public ArmeriaTelemetryBuilder setEmitExperimentalHttpServerMetrics( @Deprecated @CanIgnoreReturnValue public ArmeriaTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -291,9 +289,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 56096edb7b3d..b24ffeacedd5 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 @@ -54,7 +54,7 @@ public JavaHttpClientTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public JavaHttpClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor> attributesExtractor) { + AttributesExtractor> attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -122,9 +122,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 6a7ab1cc20f4..b1d5f16109c9 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 @@ -69,7 +69,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 3f242b7fbb3c..326f4e6a3404 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 @@ -69,7 +69,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 588bf415499d..e5505068ef67 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 cae8789df16b..846f41a6efc1 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 @@ -124,9 +124,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 8e830da41473..f6266db64f4d 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 @@ -54,7 +54,7 @@ public OkHttpTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public OkHttpTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -119,9 +119,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 b1e0ddf1db5c..79996c7081e9 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 @@ -36,7 +36,7 @@ public final class RatpackClientTelemetryBuilder { @CanIgnoreReturnValue public RatpackClientTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -87,9 +87,7 @@ public RatpackClientTelemetryBuilder setKnownMethods(Collection knownMet /** 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 07da8e9959b3..da79bbdafbd9 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 @@ -40,7 +40,7 @@ public final class RatpackServerTelemetryBuilder { */ @CanIgnoreReturnValue public RatpackServerTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -91,8 +91,7 @@ public RatpackServerTelemetryBuilder setKnownMethods(Collection knownMet /** 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 8239fbeeed33..8cfa02dccc6d 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 @@ -193,9 +193,7 @@ public RatpackTelemetryBuilder setEmitExperimentalHttpServerMetrics( @Deprecated @CanIgnoreReturnValue public RatpackTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -209,8 +207,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 b45c063a9a5e..d45f0897b369 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 @@ -103,7 +103,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 ed7f134a0b76..d086b3024c64 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 @@ -103,7 +103,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 1b34f2bad280..ef16348f4d91 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 @@ -62,7 +62,7 @@ public SpringWebTelemetryBuilder addAttributeExtractor( */ @CanIgnoreReturnValue public SpringWebTelemetryBuilder addAttributesExtractor( - AttributesExtractor attributesExtractor) { + AttributesExtractor attributesExtractor) { builder.addAttributesExtractor(attributesExtractor); return this; } @@ -92,9 +92,7 @@ public SpringWebTelemetryBuilder setCapturedResponseHeaders(Collection r /** 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 7535fbe62466..01d1ec6b14d1 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 @@ -96,9 +96,7 @@ public SpringWebfluxClientTelemetryBuilder setKnownMethods(Collection kn /** 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 4142b7a3a9e9..938be5d0c63f 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 @@ -97,9 +97,7 @@ public SpringWebfluxServerTelemetryBuilder setKnownMethods(Collection kn /** 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 3fa01131678c..a77817c21482 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 @@ -210,9 +210,7 @@ public SpringWebfluxTelemetryBuilder setEmitExperimentalHttpServerTelemetry( @Deprecated @CanIgnoreReturnValue public SpringWebfluxTelemetryBuilder setClientSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> clientSpanNameExtractor) { clientBuilder.setSpanNameExtractor(clientSpanNameExtractor); return this; @@ -227,9 +225,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 9980ac7be7fc..c89367e863dd 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( /** 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 f7d6a030d6c6..c47cf7f8aaf4 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( /** Sets custom {@link SpanNameExtractor} via transform function. */ @CanIgnoreReturnValue public SpringWebMvcTelemetryBuilder setSpanNameExtractor( - Function< - SpanNameExtractor, - ? extends SpanNameExtractor> + Function, SpanNameExtractor> spanNameExtractor) { builder.setSpanNameExtractor(spanNameExtractor); return this;