Interface GrpcSenderConfig
@Immutable
public interface GrpcSenderConfig
Configuration for
GrpcSender implementations, provided via GrpcSenderProvider.createSender(GrpcSenderConfig).- Since:
- 1.59.0
-
Method Summary
Modifier and TypeMethodDescriptionThe compressor, ornullif no compression is used.The max duration allowed to connect to a target host.The gRPC endpoint to send to, including scheme.The executor service used to execute any asynchronous processing, ornullif the sender default executor service should be used.The fully qualified gRPC method name, e.g.Additional headers that must be appended to every request.default longThe maximum number of bytes to read from a response body.The retry policy, ornullif retry is disabled.The SSL context to use, ornullif the system default is used.The max duration allowed to send a request, including resolving DNS, connecting, writing the request, reading the response, and any retries viagetRetryPolicy().The trust manager to use, ornullif the system default is used.
-
Method Details
-
getEndpoint
URI getEndpoint()The gRPC endpoint to send to, including scheme. Omits path, which must be obtained fromgetFullMethodName(). -
getFullMethodName
String getFullMethodName()The fully qualified gRPC method name, e.g.opentelemetry.proto.collector.trace.v1.TraceService/Export. -
getCompressor
The compressor, ornullif no compression is used. If present,Compressor.compress(OutputStream)must be applied toMessageWriter.writeMessage(OutputStream)whenGrpcSender.send(MessageWriter, Consumer, Consumer)is called andCompressor.getEncoding()must be set as thegrpc-encoding. -
getTimeout
Duration getTimeout()The max duration allowed to send a request, including resolving DNS, connecting, writing the request, reading the response, and any retries viagetRetryPolicy(). -
getConnectTimeout
Duration getConnectTimeout()The max duration allowed to connect to a target host. -
getHeadersSupplier
Additional headers that must be appended to every request. The resultingSuppliermust be invoked for each request. -
getRetryPolicy
The retry policy, ornullif retry is disabled. -
getSslContext
The SSL context to use, ornullif the system default is used. If non-null,getTrustManager()will also be non-null. -
getTrustManager
The trust manager to use, ornullif the system default is used. If non-null,getSslContext()will also be non-null. -
getExecutorService
The executor service used to execute any asynchronous processing, ornullif the sender default executor service should be used. -
getMaxResponseBodySize
default long getMaxResponseBodySize()The maximum number of bytes to read from a response body. Defaults to 4 MiB.Warning: setting a high or unbounded limit allows a malicious or misconfigured server to cause unbounded heap allocation, potentially leading to out-of-memory errors.
- Since:
- 1.61.0
-