public static class OtlpGrpcMetricExporter.Builder extends io.opentelemetry.sdk.common.export.ConfigBuilder<OtlpGrpcMetricExporter.Builder>
| Modifier and Type | Method and Description |
|---|---|
OtlpGrpcMetricExporter.Builder |
addHeader(String key,
String value)
Add header to request.
|
OtlpGrpcMetricExporter |
build()
Constructs a new instance of the exporter based on the builder's values.
|
protected OtlpGrpcMetricExporter.Builder |
fromConfigMap(Map<String,String> configMap,
io.opentelemetry.sdk.common.export.ConfigBuilder.NamingConvention namingConvention)
Sets the configuration values from the given configuration map for only the available keys.
|
OtlpGrpcMetricExporter.Builder |
setChannel(io.grpc.ManagedChannel channel)
Sets the managed chanel to use when communicating with the backend.
|
OtlpGrpcMetricExporter.Builder |
setDeadlineMs(long deadlineMs)
Sets the max waiting time for the collector to process each metric batch.
|
OtlpGrpcMetricExporter.Builder |
setEndpoint(String endpoint)
Sets the OTLP endpoint to connect to.
|
OtlpGrpcMetricExporter.Builder |
setUseTls(boolean useTls)
Sets use or not TLS, default is false.
|
public OtlpGrpcMetricExporter.Builder setChannel(io.grpc.ManagedChannel channel)
setEndpoint(String) if both are called.channel - the channel to usepublic OtlpGrpcMetricExporter.Builder setDeadlineMs(long deadlineMs)
deadlineMs - the max waiting timepublic OtlpGrpcMetricExporter.Builder setEndpoint(String endpoint)
endpoint - endpoint to connect topublic OtlpGrpcMetricExporter.Builder setUseTls(boolean useTls)
endpoint
is set to build channel.useTls - use TLS or notpublic OtlpGrpcMetricExporter.Builder addHeader(String key, String value)
endpoint is set to build
channel.key - header keyvalue - header valuepublic OtlpGrpcMetricExporter build()
protected OtlpGrpcMetricExporter.Builder fromConfigMap(Map<String,String> configMap, io.opentelemetry.sdk.common.export.ConfigBuilder.NamingConvention namingConvention)
fromConfigMap in class io.opentelemetry.sdk.common.export.ConfigBuilder<OtlpGrpcMetricExporter.Builder>configMap - Map holding the configuration values.