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 booleanconfigContainsKey(ConfigProperties config, String propertyToRead) static voidconfigureOtlpExporterBuilder(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 voidconfigureOtlpExporterBuilder(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 voidconfigureOtlpHeaders(ConfigProperties config, String dataType, BiConsumer<String, String> addHeader) private static URLprivate static StringdeterminePropertyByType(ConfigProperties config, String prefix, String dataType, String suffix) static StringgetOtlpProtocol(String dataType, ConfigProperties config) Determine the configured OTLP protocol for thedataType.static StringDetermine the configured OTLP protocol for thedataType.private static byte[]readFileBytes(String filePath) private static StringsignalPath(String dataType) private static URLvalidateEndpoint(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
-