-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove reflection from builder (#11673)
- Loading branch information
1 parent
3037865
commit 0e218de
Showing
12 changed files
with
101 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...lemetry/instrumentation/httpclient/internal/JavaHttpClientInstrumenterBuilderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.httpclient.internal; | ||
|
||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.instrumentation.api.incubator.builder.internal.DefaultHttpClientInstrumenterBuilder; | ||
import java.net.http.HttpRequest; | ||
import java.net.http.HttpResponse; | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
public class JavaHttpClientInstrumenterBuilderFactory { | ||
private JavaHttpClientInstrumenterBuilderFactory() {} | ||
|
||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.java-http-client"; | ||
|
||
public static DefaultHttpClientInstrumenterBuilder<HttpRequest, HttpResponse<?>> create( | ||
OpenTelemetry openTelemetry) { | ||
return new DefaultHttpClientInstrumenterBuilder<>( | ||
INSTRUMENTATION_NAME, openTelemetry, JavaHttpClientAttributesGetter.INSTANCE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...rumentation/jetty/httpclient/v9_2/internal/JettyHttpClientInstrumenterBuilderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.jetty.httpclient.v9_2.internal; | ||
|
||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.instrumentation.api.incubator.builder.internal.DefaultHttpClientInstrumenterBuilder; | ||
import org.eclipse.jetty.client.api.Request; | ||
import org.eclipse.jetty.client.api.Response; | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
public class JettyHttpClientInstrumenterBuilderFactory { | ||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.jetty-httpclient-9.2"; | ||
|
||
private JettyHttpClientInstrumenterBuilderFactory() {} | ||
|
||
public static DefaultHttpClientInstrumenterBuilder<Request, Response> create( | ||
OpenTelemetry openTelemetry) { | ||
return new DefaultHttpClientInstrumenterBuilder<>( | ||
INSTRUMENTATION_NAME, openTelemetry, JettyClientHttpAttributesGetter.INSTANCE) | ||
.setHeaderSetter(HttpHeaderSetter.INSTANCE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...elemetry/instrumentation/okhttp/v3_0/internal/OkHttpClientInstrumenterBuilderFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.instrumentation.okhttp.v3_0.internal; | ||
|
||
import io.opentelemetry.api.OpenTelemetry; | ||
import io.opentelemetry.instrumentation.api.incubator.builder.internal.DefaultHttpClientInstrumenterBuilder; | ||
import okhttp3.Request; | ||
import okhttp3.Response; | ||
|
||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. | ||
*/ | ||
public class OkHttpClientInstrumenterBuilderFactory { | ||
private static final String INSTRUMENTATION_NAME = "io.opentelemetry.okhttp-3.0"; | ||
|
||
private OkHttpClientInstrumenterBuilderFactory() {} | ||
|
||
public static DefaultHttpClientInstrumenterBuilder<Request, Response> create( | ||
OpenTelemetry openTelemetry) { | ||
return new DefaultHttpClientInstrumenterBuilder<>( | ||
INSTRUMENTATION_NAME, openTelemetry, OkHttpAttributesGetter.INSTANCE); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters