-
Notifications
You must be signed in to change notification settings - Fork 937
Refactor http, grpc senders and promote to public API #7782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b4ef764
Refactor http, grpc senders and promote to public API
jack-berg fd565bb
PR feedback
jack-berg ee21659
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg 5336b6b
Common MessageWriter abstraction
jack-berg b8cf047
Read response before accessing trailers
jack-berg 4a4757e
Fix build
jack-berg e35c950
PR feedback
jack-berg c732674
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
jack-berg a392cd0
Finish renaming to fullMethodName
jack-berg 0a153ec
Require HttpResponse#getResponseBody(), GrpcResponse#getResponseMessage
jack-berg 1980f2c
Remove CompressorProvider, making Compressor SPI
jack-berg 5dbc218
timeout nanos to duration
jack-berg 450b033
Retain support for old sender SPI properties
jack-berg c9d4034
Move sender to opentelemetry-sdk-common
jack-berg 2e6c486
Merge pull request #20 from jack-berg/move-sender-to-sdk-common
jack-berg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
120 changes: 119 additions & 1 deletion
120
docs/apidiffs/current_vs_latest/opentelemetry-exporter-common.txt
This file contains hidden or 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 |
|---|---|---|
| @@ -1,2 +1,120 @@ | ||
| Comparing source compatibility of opentelemetry-exporter-common-1.56.0-SNAPSHOT.jar against opentelemetry-exporter-common-1.55.0.jar | ||
| No changes. | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.compressor.Compressor (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.io.OutputStream compress(java.io.OutputStream) | ||
| +++ NEW EXCEPTION: java.io.IOException | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getEncoding() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.compressor.CompressorProvider (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.compressor.Compressor getInstance() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcMessageWriter (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) int contentLength() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void writeMessage(java.io.OutputStream) | ||
| +++ NEW EXCEPTION: java.io.IOException | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcResponse (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) byte[] getResponseMessage() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcStatusCode getStatusCode() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getStatusDescription() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcSender (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void send(io.opentelemetry.exporter.grpc.GrpcMessageWriter, java.util.function.Consumer<io.opentelemetry.exporter.grpc.GrpcResponse>, java.util.function.Consumer<java.lang.Throwable>) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.CompletableResultCode shutdown() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcSenderConfig (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.compressor.Compressor getCompressor() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) long getConnectTimeoutNanos() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.net.URI getEndpoint() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.concurrent.ExecutorService getExecutorService() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getFullServiceName() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getHeadersSupplier() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getMethodName() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.RetryPolicy getRetryPolicy() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.SSLContext getSslContext() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) long getTimeoutNanos() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.X509TrustManager getTrustManager() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcSenderProvider (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.grpc.GrpcSender createSender(io.opentelemetry.exporter.grpc.GrpcSenderConfig) | ||
| +++ NEW ENUM: PUBLIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode (compatible) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW INTERFACE: java.lang.constant.Constable | ||
| +++ NEW INTERFACE: java.lang.Comparable | ||
| +++ NEW INTERFACE: java.io.Serializable | ||
| +++ NEW SUPERCLASS: java.lang.Enum | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode RESOURCE_EXHAUSTED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode ALREADY_EXISTS | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode UNIMPLEMENTED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode FAILED_PRECONDITION | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode NOT_FOUND | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode DEADLINE_EXCEEDED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode OUT_OF_RANGE | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode UNAUTHENTICATED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode CANCELLED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode DATA_LOSS | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode INTERNAL | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode UNAVAILABLE | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode UNKNOWN | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode ABORTED | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode OK | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode INVALID_ARGUMENT | ||
| +++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) io.opentelemetry.exporter.grpc.GrpcStatusCode PERMISSION_DENIED | ||
| +++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.exporter.grpc.GrpcStatusCode fromValue(int) | ||
| +++ NEW METHOD: PUBLIC(+) int getValue() | ||
| +++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.exporter.grpc.GrpcStatusCode valueOf(java.lang.String) | ||
| +++ NEW METHOD: PUBLIC(+) STATIC(+) io.opentelemetry.exporter.grpc.GrpcStatusCode[] values() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpRequestBodyWriter (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) int contentLength() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void writeRequestBody(java.io.OutputStream) | ||
| +++ NEW EXCEPTION: java.io.IOException | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpResponse (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) byte[] getResponseBody() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) int getStatusCode() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getStatusMessage() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpSender (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void send(io.opentelemetry.exporter.http.HttpRequestBodyWriter, java.util.function.Consumer<io.opentelemetry.exporter.http.HttpResponse>, java.util.function.Consumer<java.lang.Throwable>) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.CompletableResultCode shutdown() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpSenderConfig (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.compressor.Compressor getCompressor() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) long getConnectTimeoutNanos() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.lang.String getContentType() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.net.URI getEndpoint() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.concurrent.ExecutorService getExecutorService() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) java.util.function.Supplier<java.util.Map<java.lang.String,java.util.List<java.lang.String>>> getHeadersSupplier() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.ProxyOptions getProxyOptions() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.sdk.common.export.RetryPolicy getRetryPolicy() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.SSLContext getSslContext() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) long getTimeoutNanos() | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) javax.net.ssl.X509TrustManager getTrustManager() | ||
| +++ NEW ANNOTATION: javax.annotation.Nullable | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpSenderProvider (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) io.opentelemetry.exporter.http.HttpSender createSender(io.opentelemetry.exporter.http.HttpSenderConfig) |
This file contains hidden or 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
13 changes: 13 additions & 0 deletions
13
exporters/common/src/main/java/io/opentelemetry/exporter/compressor/CompressorProvider.java
This file contains hidden or 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,13 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.exporter.compressor; | ||
|
|
||
| /** A service provider interface (SPI) for providing {@link Compressor}s. */ | ||
| public interface CompressorProvider { | ||
|
|
||
| /** Return the {@link Compressor}. */ | ||
| Compressor getInstance(); | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
exporters/common/src/main/java/io/opentelemetry/exporter/grpc/GrpcMessageWriter.java
This file contains hidden or 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,19 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.exporter.grpc; | ||
|
|
||
| import java.io.IOException; | ||
| import java.io.OutputStream; | ||
|
|
||
| /** Writes gRPC messages to an {@link OutputStream}. */ | ||
| public interface GrpcMessageWriter { | ||
|
|
||
| /** Write the gRPC message bytes to the {@link OutputStream}. */ | ||
| void writeMessage(OutputStream output) throws IOException; | ||
|
|
||
| /** Returns the message length in bytes. */ | ||
| int contentLength(); | ||
jack-berg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
30 changes: 30 additions & 0 deletions
30
exporters/common/src/main/java/io/opentelemetry/exporter/grpc/GrpcResponse.java
This file contains hidden or 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,30 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.exporter.grpc; | ||
|
|
||
| import java.util.function.Consumer; | ||
| import javax.annotation.Nullable; | ||
| import javax.annotation.concurrent.Immutable; | ||
|
|
||
| /** | ||
| * A gRPC response. | ||
| * | ||
| * @see GrpcSender#send(GrpcMessageWriter, Consumer, Consumer) | ||
| */ | ||
| @Immutable | ||
| public interface GrpcResponse { | ||
|
|
||
| /** The response gRPC status code. */ | ||
| GrpcStatusCode getStatusCode(); | ||
|
|
||
| /** A string description of the status. */ | ||
| @Nullable | ||
| String getStatusDescription(); | ||
|
|
||
| /** The gRPC response message bytes. */ | ||
| @SuppressWarnings("mutable") | ||
| byte[] getResponseMessage(); | ||
jack-berg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
40 changes: 40 additions & 0 deletions
40
exporters/common/src/main/java/io/opentelemetry/exporter/grpc/GrpcSender.java
This file contains hidden or 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,40 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.exporter.grpc; | ||
|
|
||
| import io.opentelemetry.sdk.common.CompletableResultCode; | ||
| import java.util.function.Consumer; | ||
|
|
||
| /** | ||
| * An abstraction for executing gRPC calls, allowing for implementations backed by different client | ||
| * libraries. | ||
| * | ||
| * <p>While this interface is public, implementing a custom sender is generally not recommended. The | ||
| * {@code opentelemetry-java} project provides built-in implementations that cover virtually all | ||
| * cases. | ||
| * | ||
| * @see GrpcSenderProvider | ||
| */ | ||
| public interface GrpcSender { | ||
|
|
||
| /** | ||
| * Execute a gRPC unary call, including any retry attempts. {@code onResponse} is called with the | ||
| * gRPC response, either a success response or an error response after retries. {@code onError} is | ||
| * called when the call could not be executed due to cancellation, connectivity problems, or | ||
| * timeout. | ||
| * | ||
| * @param messageWriter the message writer | ||
| * @param onResponse the callback to invoke with the gRPC response | ||
| * @param onError the callback to invoke when the gRPC call could not be executed | ||
| */ | ||
| void send( | ||
| GrpcMessageWriter messageWriter, | ||
| Consumer<GrpcResponse> onResponse, | ||
| Consumer<Throwable> onError); | ||
|
|
||
| /** Shutdown the sender. */ | ||
| CompletableResultCode shutdown(); | ||
| } |
93 changes: 93 additions & 0 deletions
93
exporters/common/src/main/java/io/opentelemetry/exporter/grpc/GrpcSenderConfig.java
This file contains hidden or 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,93 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.exporter.grpc; | ||
|
|
||
| import io.opentelemetry.exporter.compressor.Compressor; | ||
| import io.opentelemetry.sdk.common.export.RetryPolicy; | ||
| import java.io.OutputStream; | ||
| import java.net.URI; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
| import java.util.concurrent.ExecutorService; | ||
| import java.util.function.Consumer; | ||
| import java.util.function.Supplier; | ||
| import javax.annotation.Nullable; | ||
| import javax.annotation.concurrent.Immutable; | ||
| import javax.net.ssl.SSLContext; | ||
| import javax.net.ssl.X509TrustManager; | ||
|
|
||
| /** | ||
| * Configuration for {@link GrpcSender} implementations, provided via {@link | ||
| * GrpcSenderProvider#createSender(GrpcSenderConfig)}. | ||
| */ | ||
| @Immutable | ||
| public interface GrpcSenderConfig { | ||
|
|
||
| /** | ||
| * The gRPC endpoint to send to, including scheme. Omits path, which must be constructed from | ||
| * {@link #getFullServiceName()} and {@link #getMethodName()}. | ||
| */ | ||
| URI getEndpoint(); | ||
|
|
||
| /** | ||
| * The fully qualified gRPC service name, e.g. {@code | ||
| * opentelemetry.proto.collector.trace.v1.TraceService}. | ||
| */ | ||
| String getFullServiceName(); | ||
|
|
||
| /** The gRPC method name, e.g. {@code Export}. */ | ||
| String getMethodName(); | ||
jack-berg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /** | ||
| * The compressor, or {@code null} if no compression is used. If present, {@link | ||
| * Compressor#compress(OutputStream)} must be applied to {@link | ||
| * GrpcMessageWriter#writeMessage(OutputStream)} when {@link GrpcSender#send(GrpcMessageWriter, | ||
| * Consumer, Consumer)} is called and {@link Compressor#getEncoding()} must be set as the {@code | ||
| * grpc-encoding}. | ||
| */ | ||
| @Nullable | ||
| Compressor getCompressor(); | ||
|
|
||
| /** | ||
| * The max time in nanoseconds allowed to send a request, including resolving DNS, connecting, | ||
| * writing the request, reading the response, and any retries via {@link #getRetryPolicy()}. | ||
| */ | ||
| long getTimeoutNanos(); | ||
jack-berg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| /** The max time in nanoseconds allowed to connect to a target host. */ | ||
| long getConnectTimeoutNanos(); | ||
|
|
||
| /** | ||
| * Additional headers that must be appended to every request. The resulting {@link Supplier} must | ||
| * be invoked for each request. | ||
| */ | ||
| Supplier<Map<String, List<String>>> getHeadersSupplier(); | ||
|
|
||
| /** The retry policy, or {@code null} if retry is disabled. */ | ||
| @Nullable | ||
| RetryPolicy getRetryPolicy(); | ||
|
|
||
| /** | ||
| * The SSL context to use, or {@code null} if the system default is used. If non-null, {@link | ||
| * #getTrustManager()} will also be non-null. | ||
| */ | ||
| @Nullable | ||
| SSLContext getSslContext(); | ||
|
|
||
| /** | ||
| * The trust manager to use, or {@code null} if the system default is used. If non-null, {@link | ||
| * #getSslContext()} will also be non-null. | ||
| */ | ||
| @Nullable | ||
| X509TrustManager getTrustManager(); | ||
|
|
||
| /** | ||
| * The executor service used to execute any asynchronous processing, or {@code null} if the sender | ||
| * default executor service should be used. | ||
| */ | ||
| @Nullable | ||
| ExecutorService getExecutorService(); | ||
| } | ||
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.