Class OtlpExporterConfig.BuilderBase<BUILDER extends OtlpExporterConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpExporterConfig>

java.lang.Object
io.helidon.telemetry.otelconfig.OtlpExporterConfig.BuilderBase<BUILDER,PROTOTYPE>
Type Parameters:
BUILDER - type of the builder extending this abstract builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.Builder.buildPrototype()
All Implemented Interfaces:
Prototype.Builder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>, ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Direct Known Subclasses:
OtlpExporterConfig.Builder
Enclosing interface:
OtlpExporterConfig

public abstract static class OtlpExporterConfig.BuilderBase<BUILDER extends OtlpExporterConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpExporterConfig> extends Object implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for OtlpExporterConfig.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(OtlpExporterConfig prototype)
      Update this builder from an existing prototype instance. This method disables automatic service discovery.
      Parameters:
      prototype - existing prototype to update this builder from
      Returns:
      updated builder instance
    • from

      public BUILDER from(OtlpExporterConfig.BuilderBase<?,?> builder)
      Update this builder from an existing prototype builder instance.
      Parameters:
      builder - existing builder prototype to update this builder from
      Returns:
      updated builder instance
    • config

      @Deprecated public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends OtlpExporterConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpExporterConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • config

      public BUILDER config(Config config)
      Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.
      Specified by:
      config in interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends OtlpExporterConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends OtlpExporterConfig>
      Parameters:
      config - configuration instance used to obtain values to update this builder
      Returns:
      updated builder instance
    • clearTimeout

      public BUILDER clearTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • timeout

      public BUILDER timeout(Duration timeout)
      Exporter timeout.
      Parameters:
      timeout - exporter timeout
      Returns:
      updated builder instance
      See Also:
    • clearEndpoint

      public BUILDER clearEndpoint()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • endpoint

      public BUILDER endpoint(URI endpoint)
      Endpoint of the collector to which the exporter should transmit.
      Parameters:
      endpoint - collector endpoint
      Returns:
      updated builder instance
      See Also:
    • clearCompression

      public BUILDER clearCompression()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • compression

      public BUILDER compression(CompressionType compression)
      Compression the exporter uses.
      Parameters:
      compression - compression type
      Returns:
      updated builder instance
      See Also:
    • headers

      public BUILDER headers(Map<String,String> headers)
      Headers added to each export message. This method replaces all values with the new ones.
      Parameters:
      headers - added headers
      Returns:
      updated builder instance
      See Also:
    • addHeaders

      public BUILDER addHeaders(Map<String,String> headers)
      Headers added to each export message. This method keeps existing values, then puts all new values into the map.
      Parameters:
      headers - added headers
      Returns:
      updated builder instance
      See Also:
    • clearClientTlsPrivateKeyPem

      public BUILDER clearClientTlsPrivateKeyPem()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • clientTlsPrivateKeyPem

      public BUILDER clientTlsPrivateKeyPem(Resource clientTlsPrivateKeyPem)
      TLS client key.
      Parameters:
      clientTlsPrivateKeyPem - TLS client key
      Returns:
      updated builder instance
      See Also:
    • clientTlsPrivateKeyPem

      public BUILDER clientTlsPrivateKeyPem(ResourceConfig clientTlsPrivateKeyPemConfig)
      TLS client key.
      Parameters:
      clientTlsPrivateKeyPemConfig - TLS client key
      Returns:
      updated builder instance
      See Also:
    • clientTlsPrivateKeyPem

      public BUILDER clientTlsPrivateKeyPem(Consumer<ResourceConfig.Builder> consumer)
      TLS client key.
      Parameters:
      consumer - TLS client key
      Returns:
      updated builder instance
      See Also:
    • clearClientTlsCertificatePem

      public BUILDER clearClientTlsCertificatePem()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • clientTlsCertificatePem

      public BUILDER clientTlsCertificatePem(Resource clientTlsCertificatePem)
      TLS certificate.
      Parameters:
      clientTlsCertificatePem - TLS certificate
      Returns:
      updated builder instance
      See Also:
    • clientTlsCertificatePem

      public BUILDER clientTlsCertificatePem(ResourceConfig clientTlsCertificatePemConfig)
      TLS certificate.
      Parameters:
      clientTlsCertificatePemConfig - TLS certificate
      Returns:
      updated builder instance
      See Also:
    • clientTlsCertificatePem

      public BUILDER clientTlsCertificatePem(Consumer<ResourceConfig.Builder> consumer)
      TLS certificate.
      Parameters:
      consumer - TLS certificate
      Returns:
      updated builder instance
      See Also:
    • clearTrustedCertificatesPem

      public BUILDER clearTrustedCertificatesPem()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • trustedCertificatesPem

      public BUILDER trustedCertificatesPem(Resource trustedCertificatesPem)
      Trusted certificates.
      Parameters:
      trustedCertificatesPem - trusted certificates
      Returns:
      updated builder instance
      See Also:
    • trustedCertificatesPem

      public BUILDER trustedCertificatesPem(ResourceConfig trustedCertificatesPemConfig)
      Trusted certificates.
      Parameters:
      trustedCertificatesPemConfig - trusted certificates
      Returns:
      updated builder instance
      See Also:
    • trustedCertificatesPem

      public BUILDER trustedCertificatesPem(Consumer<ResourceConfig.Builder> consumer)
      Trusted certificates.
      Parameters:
      consumer - trusted certificates
      Returns:
      updated builder instance
      See Also:
    • clearRetryPolicy

      public BUILDER clearRetryPolicy()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • retryPolicy

      public BUILDER retryPolicy(io.opentelemetry.sdk.common.export.RetryPolicy retryPolicy)
      Retry policy.
      Parameters:
      retryPolicy - retry policy
      Returns:
      updated builder instance
      See Also:
    • clearProtocol

      public BUILDER clearProtocol()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • protocol

      public BUILDER protocol(OtlpExporterProtocolType protocol)
      Exporter protocol type.
      Parameters:
      protocol - exporter protocol type
      Returns:
      updated builder instance
      See Also:
    • clearSslContext

      public BUILDER clearSslContext()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • sslContext

      public BUILDER sslContext(SSLContext sslContext)
      SSL context for the exporter.
      Parameters:
      sslContext - SSL context
      Returns:
      updated builder instance
      See Also:
    • clearTrustManager

      public BUILDER clearTrustManager()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • trustManager

      public BUILDER trustManager(X509TrustManager trustManager)
      X509 trust manager for the exporter.
      Parameters:
      trustManager - X509 trust manager
      Returns:
      updated builder instance
      See Also:
    • clearMeterProvider

      public BUILDER clearMeterProvider()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • meterProvider

      public BUILDER meterProvider(io.opentelemetry.api.metrics.MeterProvider meterProvider)
      Meter provider for the exporter.
      Parameters:
      meterProvider - meter provider
      Returns:
      updated builder instance
      See Also:
    • timeout

      public Optional<Duration> timeout()
      Exporter timeout.
      Returns:
      the timeout
    • endpoint

      public Optional<URI> endpoint()
      Endpoint of the collector to which the exporter should transmit.
      Returns:
      the endpoint
    • compression

      public Optional<CompressionType> compression()
      Compression the exporter uses.
      Returns:
      the compression
    • headers

      public Map<String,String> headers()
      Headers added to each export message.
      Returns:
      the headers
    • clientTlsPrivateKeyPem

      public Optional<Resource> clientTlsPrivateKeyPem()
      TLS client key.
      Returns:
      the client tls private key pem
    • clientTlsCertificatePem

      public Optional<Resource> clientTlsCertificatePem()
      TLS certificate.
      Returns:
      the client tls certificate pem
    • trustedCertificatesPem

      public Optional<Resource> trustedCertificatesPem()
      Trusted certificates.
      Returns:
      the trusted certificates pem
    • retryPolicy

      public Optional<io.opentelemetry.sdk.common.export.RetryPolicy> retryPolicy()
      Retry policy.
      Returns:
      the retry policy
    • protocol

      public Optional<OtlpExporterProtocolType> protocol()
      Exporter protocol type.
      Returns:
      the protocol
    • sslContext

      public Optional<SSLContext> sslContext()
      SSL context for the exporter.
      Returns:
      the ssl context
    • trustManager

      public Optional<X509TrustManager> trustManager()
      X509 trust manager for the exporter.
      Returns:
      the trust manager
    • meterProvider

      public Optional<io.opentelemetry.api.metrics.MeterProvider> meterProvider()
      Meter provider for the exporter.
      Returns:
      the meter provider
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.