Skip to content

Commit e5a9d1c

Browse files
authored
Change setKnownMethods(Set) to setKnownMethods(Collection) (#12902)
1 parent 02725c1 commit e5a9d1c

File tree

31 files changed

+163
-82
lines changed

31 files changed

+163
-82
lines changed

docs/apidiffs/current_vs_latest/opentelemetry-instrumentation-api.txt

+10
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ Comparing source compatibility of opentelemetry-instrumentation-api-2.12.0-SNAPS
44
GENERIC TEMPLATES: === REQUEST:java.lang.Object, === RESPONSE:java.lang.Object
55
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedRequestHeaders(java.util.Collection<java.lang.String>)
66
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedResponseHeaders(java.util.Collection<java.lang.String>)
7+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder<REQUEST,RESPONSE> setKnownMethods(java.util.Collection<java.lang.String>)
78
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.instrumentation.api.semconv.http.HttpServerAttributesExtractorBuilder (not serializable)
89
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
910
GENERIC TEMPLATES: === REQUEST:java.lang.Object, === RESPONSE:java.lang.Object
1011
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedRequestHeaders(java.util.Collection<java.lang.String>)
1112
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> setCapturedResponseHeaders(java.util.Collection<java.lang.String>)
13+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpServerAttributesExtractorBuilder<REQUEST,RESPONSE> setKnownMethods(java.util.Collection<java.lang.String>)
14+
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.instrumentation.api.semconv.http.HttpServerRouteBuilder (not serializable)
15+
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
16+
GENERIC TEMPLATES: === REQUEST:java.lang.Object
17+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpServerRouteBuilder<REQUEST> setKnownMethods(java.util.Collection<java.lang.String>)
18+
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.instrumentation.api.semconv.http.HttpSpanNameExtractorBuilder (not serializable)
19+
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
20+
GENERIC TEMPLATES: === REQUEST:java.lang.Object
21+
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.instrumentation.api.semconv.http.HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(java.util.Collection<java.lang.String>)

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpClientInstrumenterBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.util.Collection;
3232
import java.util.List;
3333
import java.util.Objects;
34-
import java.util.Set;
3534
import java.util.function.Consumer;
3635
import java.util.function.Function;
3736
import java.util.function.Supplier;
@@ -155,11 +154,11 @@ public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setCapturedRespon
155154
* not supplement it.
156155
*
157156
* @param knownMethods A set of recognized HTTP request methods.
158-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
157+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
159158
*/
160159
@CanIgnoreReturnValue
161160
public DefaultHttpClientInstrumenterBuilder<REQUEST, RESPONSE> setKnownMethods(
162-
Set<String> knownMethods) {
161+
Collection<String> knownMethods) {
163162
httpAttributesExtractorBuilder.setKnownMethods(knownMethods);
164163
httpSpanNameExtractorBuilder.setKnownMethods(knownMethods);
165164
return this;

instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/builder/internal/DefaultHttpServerInstrumenterBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.util.Collection;
3131
import java.util.List;
3232
import java.util.Objects;
33-
import java.util.Set;
3433
import java.util.function.Consumer;
3534
import java.util.function.Function;
3635
import java.util.function.Supplier;
@@ -153,11 +152,11 @@ public DefaultHttpServerInstrumenterBuilder<REQUEST, RESPONSE> setCapturedRespon
153152
* not supplement it.
154153
*
155154
* @param knownMethods A set of recognized HTTP request methods.
156-
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Set)
155+
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Collection)
157156
*/
158157
@CanIgnoreReturnValue
159158
public DefaultHttpServerInstrumenterBuilder<REQUEST, RESPONSE> setKnownMethods(
160-
Set<String> knownMethods) {
159+
Collection<String> knownMethods) {
161160
httpAttributesExtractorBuilder.setKnownMethods(knownMethods);
162161
httpSpanNameExtractorBuilder.setKnownMethods(knownMethods);
163162
httpServerRouteBuilder.setKnownMethods(knownMethods);

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/semconv/http/HttpClientAttributesExtractorBuilder.java

+24-1
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,34 @@ public HttpClientAttributesExtractorBuilder<REQUEST, RESPONSE> setCapturedRespon
137137
*/
138138
@CanIgnoreReturnValue
139139
public HttpClientAttributesExtractorBuilder<REQUEST, RESPONSE> setKnownMethods(
140-
Set<String> knownMethods) {
140+
Collection<String> knownMethods) {
141141
this.knownMethods = new HashSet<>(knownMethods);
142142
return this;
143143
}
144144

145+
/**
146+
* Configures the extractor to recognize an alternative set of HTTP request methods.
147+
*
148+
* <p>By default, this extractor defines "known" methods as the ones listed in <a
149+
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH
150+
* method defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>. If an
151+
* unknown method is encountered, the extractor will use the value {@value HttpConstants#_OTHER}
152+
* instead of it and put the original value in an extra {@code http.request.method_original}
153+
* attribute.
154+
*
155+
* <p>Note: calling this method <b>overrides</b> the default known method sets completely; it does
156+
* not supplement it.
157+
*
158+
* @param knownMethods A set of recognized HTTP request methods.
159+
*/
160+
// don't deprecate this since users will get deprecation warning without a clean way to suppress
161+
// it if they're using Set
162+
@CanIgnoreReturnValue
163+
public HttpClientAttributesExtractorBuilder<REQUEST, RESPONSE> setKnownMethods(
164+
Set<String> knownMethods) {
165+
return setKnownMethods((Collection<String>) knownMethods);
166+
}
167+
145168
// visible for tests
146169
@CanIgnoreReturnValue
147170
HttpClientAttributesExtractorBuilder<REQUEST, RESPONSE> setResendCountIncrementer(

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/semconv/http/HttpServerAttributesExtractorBuilder.java

+24-1
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,34 @@ public HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> setCapturedRespon
144144
*/
145145
@CanIgnoreReturnValue
146146
public HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> setKnownMethods(
147-
Set<String> knownMethods) {
147+
Collection<String> knownMethods) {
148148
this.knownMethods = new HashSet<>(knownMethods);
149149
return this;
150150
}
151151

152+
/**
153+
* Configures the extractor to recognize an alternative set of HTTP request methods.
154+
*
155+
* <p>By default, this extractor defines "known" methods as the ones listed in <a
156+
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH
157+
* method defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>. If an
158+
* unknown method is encountered, the extractor will use the value {@value HttpConstants#_OTHER}
159+
* instead of it and put the original value in an extra {@code http.request.method_original}
160+
* attribute.
161+
*
162+
* <p>Note: calling this method <b>overrides</b> the default known method sets completely; it does
163+
* not supplement it.
164+
*
165+
* @param knownMethods A set of recognized HTTP request methods.
166+
*/
167+
// don't deprecate this since users will get deprecation warning without a clean way to suppress
168+
// it if they're using Set
169+
@CanIgnoreReturnValue
170+
public HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> setKnownMethods(
171+
Set<String> knownMethods) {
172+
return setKnownMethods((Collection<String>) knownMethods);
173+
}
174+
152175
// visible for tests
153176
@CanIgnoreReturnValue
154177
HttpServerAttributesExtractorBuilder<REQUEST, RESPONSE> setHttpRouteGetter(

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/semconv/http/HttpServerRouteBuilder.java

+23-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.opentelemetry.instrumentation.api.instrumenter.InstrumenterBuilder;
1313
import io.opentelemetry.instrumentation.api.internal.HttpConstants;
1414
import io.opentelemetry.instrumentation.api.internal.HttpRouteState;
15+
import java.util.Collection;
1516
import java.util.HashSet;
1617
import java.util.Set;
1718

@@ -44,11 +45,32 @@ public final class HttpServerRouteBuilder<REQUEST> {
4445
* @param knownMethods A set of recognized HTTP request methods.
4546
*/
4647
@CanIgnoreReturnValue
47-
public HttpServerRouteBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) {
48+
public HttpServerRouteBuilder<REQUEST> setKnownMethods(Collection<String> knownMethods) {
4849
this.knownMethods = new HashSet<>(knownMethods);
4950
return this;
5051
}
5152

53+
/**
54+
* Configures the customizer to recognize an alternative set of HTTP request methods.
55+
*
56+
* <p>By default, this customizer defines "known" methods as the ones listed in <a
57+
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH
58+
* method defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>. If an
59+
* unknown method is encountered, the customizer will use the value {@value HttpConstants#_OTHER}
60+
* instead.
61+
*
62+
* <p>Note: calling this method <b>overrides</b> the default known method sets completely; it does
63+
* not supplement it.
64+
*
65+
* @param knownMethods A set of recognized HTTP request methods.
66+
*/
67+
// don't deprecate this since users will get deprecation warning without a clean way to suppress
68+
// it if they're using Set
69+
@CanIgnoreReturnValue
70+
public HttpServerRouteBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) {
71+
return setKnownMethods((Collection<String>) knownMethods);
72+
}
73+
5274
/**
5375
* Returns a {@link ContextCustomizer} that initializes an {@link HttpServerRoute} in the {@link
5476
* Context} returned from {@link Instrumenter#start(Context, Object)}. The returned customizer is

instrumentation-api/src/main/java/io/opentelemetry/instrumentation/api/semconv/http/HttpSpanNameExtractorBuilder.java

+24-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
1313
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor;
1414
import io.opentelemetry.instrumentation.api.internal.HttpConstants;
15+
import java.util.Collection;
1516
import java.util.HashSet;
1617
import java.util.Set;
1718
import javax.annotation.Nullable;
@@ -50,11 +51,33 @@ public HttpSpanNameExtractorBuilder(
5051
* @param knownMethods A set of recognized HTTP request methods.
5152
*/
5253
@CanIgnoreReturnValue
53-
public HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) {
54+
public HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(Collection<String> knownMethods) {
5455
this.knownMethods = new HashSet<>(knownMethods);
5556
return this;
5657
}
5758

59+
/**
60+
* Configures the extractor to recognize an alternative set of HTTP request methods.
61+
*
62+
* <p>By default, this extractor defines "known" methods as the ones listed in <a
63+
* href="https://www.rfc-editor.org/rfc/rfc9110.html#name-methods">RFC9110</a> and the PATCH
64+
* method defined in <a href="https://www.rfc-editor.org/rfc/rfc5789.html">RFC5789</a>. If an
65+
* unknown method is encountered, the extractor will use the value {@value HttpConstants#_OTHER}
66+
* instead of it and put the original value in an extra {@code http.request.method_original}
67+
* attribute.
68+
*
69+
* <p>Note: calling this method <b>overrides</b> the default known method sets completely; it does
70+
* not supplement it.
71+
*
72+
* @param knownMethods A set of recognized HTTP request methods.
73+
*/
74+
// don't deprecate this since users will get deprecation warning without a clean way to suppress
75+
// it if they're using Set
76+
@CanIgnoreReturnValue
77+
public HttpSpanNameExtractorBuilder<REQUEST> setKnownMethods(Set<String> knownMethods) {
78+
return setKnownMethods((Collection<String>) knownMethods);
79+
}
80+
5881
/**
5982
* Returns a new {@link HttpSpanNameExtractor} with the settings of this {@link
6083
* HttpSpanNameExtractorBuilder}.

instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor;
1414
import io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder;
1515
import java.util.Collection;
16-
import java.util.Set;
1716
import java.util.function.Function;
1817
import org.apache.http.HttpResponse;
1918

@@ -98,10 +97,10 @@ public ApacheHttpClientTelemetryBuilder setCapturedResponseHeaders(
9897
* not supplement it.
9998
*
10099
* @param knownMethods A set of recognized HTTP request methods.
101-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
100+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
102101
*/
103102
@CanIgnoreReturnValue
104-
public ApacheHttpClientTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
103+
public ApacheHttpClientTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
105104
builder.setKnownMethods(knownMethods);
106105
return this;
107106
}

instrumentation/apache-httpclient/apache-httpclient-5.2/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v5_2/ApacheHttpClientTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import io.opentelemetry.instrumentation.api.instrumenter.SpanNameExtractor;
1414
import io.opentelemetry.instrumentation.api.semconv.http.HttpClientAttributesExtractorBuilder;
1515
import java.util.Collection;
16-
import java.util.Set;
1716
import java.util.function.Function;
1817
import org.apache.hc.core5.http.HttpResponse;
1918

@@ -83,10 +82,10 @@ public ApacheHttpClientTelemetryBuilder setCapturedResponseHeaders(
8382
* not supplement it.
8483
*
8584
* @param knownMethods A set of recognized HTTP request methods.
86-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
85+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
8786
*/
8887
@CanIgnoreReturnValue
89-
public ApacheHttpClientTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
88+
public ApacheHttpClientTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
9089
builder.setKnownMethods(knownMethods);
9190
return this;
9291
}

instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaClientTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import io.opentelemetry.instrumentation.armeria.v1_3.internal.ArmeriaInstrumenterBuilderUtil;
1919
import io.opentelemetry.instrumentation.armeria.v1_3.internal.Experimental;
2020
import java.util.Collection;
21-
import java.util.Set;
2221
import java.util.function.Function;
2322

2423
public final class ArmeriaClientTelemetryBuilder {
@@ -94,10 +93,10 @@ public ArmeriaClientTelemetryBuilder setCapturedResponseHeaders(
9493
* not supplement it.
9594
*
9695
* @param knownMethods A set of recognized HTTP request methods.
97-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
96+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
9897
*/
9998
@CanIgnoreReturnValue
100-
public ArmeriaClientTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
99+
public ArmeriaClientTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
101100
builder.setKnownMethods(knownMethods);
102101
return this;
103102
}

instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaServerTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import io.opentelemetry.instrumentation.armeria.v1_3.internal.ArmeriaInstrumenterBuilderUtil;
1919
import io.opentelemetry.instrumentation.armeria.v1_3.internal.Experimental;
2020
import java.util.Collection;
21-
import java.util.Set;
2221
import java.util.function.Function;
2322

2423
public final class ArmeriaServerTelemetryBuilder {
@@ -92,10 +91,10 @@ public ArmeriaServerTelemetryBuilder setCapturedResponseHeaders(
9291
* not supplement it.
9392
*
9493
* @param knownMethods A set of recognized HTTP request methods.
95-
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Set)
94+
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Collection)
9695
*/
9796
@CanIgnoreReturnValue
98-
public ArmeriaServerTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
97+
public ArmeriaServerTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
9998
builder.setKnownMethods(knownMethods);
10099
return this;
101100
}

instrumentation/armeria/armeria-1.3/library/src/main/java/io/opentelemetry/instrumentation/armeria/v1_3/ArmeriaTelemetryBuilder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ public ArmeriaTelemetryBuilder setCapturedServerResponseHeaders(List<String> res
222222
* not supplement it.
223223
*
224224
* @param knownMethods A set of recognized HTTP request methods.
225-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
226-
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Set)
227-
* @deprecated Use {@link ArmeriaClientTelemetryBuilder#setKnownMethods(Set)} and {@link
228-
* ArmeriaServerTelemetryBuilder#setKnownMethods(Set)} instead.
225+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
226+
* @see HttpServerAttributesExtractorBuilder#setKnownMethods(Collection)
227+
* @deprecated Use {@link ArmeriaClientTelemetryBuilder#setKnownMethods(Collection)} and {@link
228+
* ArmeriaServerTelemetryBuilder#setKnownMethods(Collection)} instead.
229229
*/
230230
@Deprecated
231231
@CanIgnoreReturnValue

instrumentation/elasticsearch/elasticsearch-rest-7.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/v7_0/ElasticsearchRest7TelemetryBuilder.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import io.opentelemetry.instrumentation.elasticsearch.rest.internal.ElasticsearchRestInstrumenterFactory;
1616
import io.opentelemetry.instrumentation.elasticsearch.rest.internal.ElasticsearchRestRequest;
1717
import java.util.ArrayList;
18+
import java.util.Collection;
1819
import java.util.HashSet;
1920
import java.util.List;
2021
import java.util.Set;
@@ -60,10 +61,10 @@ public ElasticsearchRest7TelemetryBuilder addAttributesExtractor(
6061
* not supplement it.
6162
*
6263
* @param knownMethods A set of recognized HTTP request methods.
63-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
64+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
6465
*/
6566
@CanIgnoreReturnValue
66-
public ElasticsearchRest7TelemetryBuilder setKnownMethods(Set<String> knownMethods) {
67+
public ElasticsearchRest7TelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
6768
this.knownMethods = new HashSet<>(knownMethods);
6869
return this;
6970
}

instrumentation/java-http-client/library/src/main/java/io/opentelemetry/instrumentation/httpclient/JavaHttpClientTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import java.net.http.HttpRequest;
1818
import java.net.http.HttpResponse;
1919
import java.util.Collection;
20-
import java.util.Set;
2120
import java.util.function.Function;
2221

2322
public final class JavaHttpClientTelemetryBuilder {
@@ -95,10 +94,10 @@ public JavaHttpClientTelemetryBuilder setCapturedResponseHeaders(
9594
* not supplement it.
9695
*
9796
* @param knownMethods A set of recognized HTTP request methods.
98-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
97+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
9998
*/
10099
@CanIgnoreReturnValue
101-
public JavaHttpClientTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
100+
public JavaHttpClientTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
102101
builder.setKnownMethods(knownMethods);
103102
return this;
104103
}

instrumentation/jetty-httpclient/jetty-httpclient-12.0/library/src/main/java/io/opentelemetry/instrumentation/jetty/httpclient/v12_0/JettyClientTelemetryBuilder.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import io.opentelemetry.instrumentation.jetty.httpclient.v12_0.internal.Experimental;
1515
import io.opentelemetry.instrumentation.jetty.httpclient.v12_0.internal.JettyHttpClientInstrumenterBuilderFactory;
1616
import java.util.Collection;
17-
import java.util.Set;
1817
import java.util.function.Function;
1918
import org.eclipse.jetty.client.HttpClientTransport;
2019
import org.eclipse.jetty.client.Request;
@@ -109,10 +108,10 @@ public JettyClientTelemetryBuilder setCapturedResponseHeaders(
109108
* not supplement it.
110109
*
111110
* @param knownMethods A set of recognized HTTP request methods.
112-
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Set)
111+
* @see HttpClientAttributesExtractorBuilder#setKnownMethods(Collection)
113112
*/
114113
@CanIgnoreReturnValue
115-
public JettyClientTelemetryBuilder setKnownMethods(Set<String> knownMethods) {
114+
public JettyClientTelemetryBuilder setKnownMethods(Collection<String> knownMethods) {
116115
builder.setKnownMethods(knownMethods);
117116
return this;
118117
}

0 commit comments

Comments
 (0)