Class OtlpConfigUtil
java.lang.Object
io.opentelemetry.exporter.otlp.internal.OtlpConfigUtil
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
configContainsKey
(ConfigProperties config, String propertyToRead) static void
configureOtlpExporterBuilder
(String dataType, ConfigProperties config, Consumer<String> setEndpoint, BiConsumer<String, String> addHeader, Consumer<String> setCompression, Consumer<Duration> setTimeout, Consumer<byte[]> setTrustedCertificates, BiConsumer<byte[], byte[]> setClientTls, Consumer<RetryPolicy> setRetryPolicy, Consumer<MemoryMode> setMemoryMode) Invoke the setters with the OTLP configuration for thedataType
.static void
configureOtlpExporterBuilder
(String dataType, StructuredConfigProperties config, Consumer<String> setEndpoint, BiConsumer<String, String> addHeader, Consumer<String> setCompression, Consumer<Duration> setTimeout, Consumer<byte[]> setTrustedCertificates, BiConsumer<byte[], byte[]> setClientTls, Consumer<RetryPolicy> setRetryPolicy, Consumer<MemoryMode> setMemoryMode) Invoke the setters with the OTLP configuration for thedataType
.private static void
configureOtlpHeaders
(ConfigProperties config, String dataType, BiConsumer<String, String> addHeader) private static URL
private static String
determinePropertyByType
(ConfigProperties config, String prefix, String dataType, String suffix) static String
getOtlpProtocol
(String dataType, ConfigProperties config) Determine the configured OTLP protocol for thedataType
.static String
Determine the configured OTLP protocol for thedataType
.private static byte[]
readFileBytes
(String filePath) private static String
signalPath
(String dataType) private static URL
validateEndpoint
(String endpoint, boolean isHttpProtobuf)
-
Field Details
-
logger
-
DATA_TYPE_TRACES
- See Also:
-
DATA_TYPE_METRICS
- See Also:
-
DATA_TYPE_LOGS
- See Also:
-
PROTOCOL_GRPC
- See Also:
-
PROTOCOL_HTTP_PROTOBUF
- See Also:
-
-
Constructor Details
-
OtlpConfigUtil
private OtlpConfigUtil()
-
-
Method Details
-
getOtlpProtocol
Determine the configured OTLP protocol for thedataType
. -
getStructuredConfigOtlpProtocol
Determine the configured OTLP protocol for thedataType
. -
configureOtlpExporterBuilder
public static void configureOtlpExporterBuilder(String dataType, ConfigProperties config, Consumer<String> setEndpoint, BiConsumer<String, String> addHeader, Consumer<String> setCompression, Consumer<Duration> setTimeout, Consumer<byte[]> setTrustedCertificates, BiConsumer<byte[], byte[]> setClientTls, Consumer<RetryPolicy> setRetryPolicy, Consumer<MemoryMode> setMemoryMode) Invoke the setters with the OTLP configuration for thedataType
. -
configureOtlpExporterBuilder
public static void configureOtlpExporterBuilder(String dataType, StructuredConfigProperties config, Consumer<String> setEndpoint, BiConsumer<String, String> addHeader, Consumer<String> setCompression, Consumer<Duration> setTimeout, Consumer<byte[]> setTrustedCertificates, BiConsumer<byte[], byte[]> setClientTls, Consumer<RetryPolicy> setRetryPolicy, Consumer<MemoryMode> setMemoryMode) Invoke the setters with the OTLP configuration for thedataType
. -
configureOtlpHeaders
private static void configureOtlpHeaders(ConfigProperties config, String dataType, BiConsumer<String, String> addHeader) -
createUrl
-
validateEndpoint
-
readFileBytes
-
determinePropertyByType
private static String determinePropertyByType(ConfigProperties config, String prefix, String dataType, String suffix) -
configContainsKey
-
signalPath
-