Record Class OpenTelemetryUtils.ServiceConfig

java.lang.Object
java.lang.Record
org.forgerock.opentelemetry.OpenTelemetryUtils.ServiceConfig
Record Components:
serviceName - The service name to use as a resource attribute for the ServiceAttributes.SERVICE_NAME property, for example IG. The value will be converted to lowercase before use.
serviceVersion - The service version to use as a resource attribute for the ServiceAttributes.SERVICE_VERSION property.
exporterSslContext - A transformation function that takes a JsonValue representing the exporter config block and returns a SSLContext that when not null, will be applied to the OtlpHttpSpanExporterBuilder.
exporterProxyInfo - A transformation function that takes a JsonValue representing the exporter config block and returns a HttpClientHandler.ProxyInfo that when not null, will be applied to the OtlpHttpSpanExporterBuilder.
Enclosing class:
OpenTelemetryUtils

public static record OpenTelemetryUtils.ServiceConfig(String serviceName, String serviceVersion, Function<JsonValue,SSLContext,JsonException> exporterSslContext, Function<JsonValue,HttpClientHandler.ProxyInfo,JsonException> exporterProxyInfo) extends Record
Service specific configuration items to be used when setting up OpenTelemetry tracing.
  • Constructor Details

    • ServiceConfig

      public ServiceConfig(String serviceName, String serviceVersion, Function<JsonValue,SSLContext,JsonException> exporterSslContext, Function<JsonValue,HttpClientHandler.ProxyInfo,JsonException> exporterProxyInfo)
      Validates the passed values.
    • ServiceConfig

      public ServiceConfig(String serviceName, String serviceVersion)
      Service specific configuration items to be used when setting up OpenTelemetry tracing.
      Parameters:
      serviceName - The service name to use as a resource attribute for the ServiceAttributes.SERVICE_NAME property, for example IG. The value will be converted to lowercase before use.
      serviceVersion - The service version to use as a resource attribute for the ServiceAttributes.SERVICE_VERSION property.
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • serviceName

      public String serviceName()
      Returns the value of the serviceName record component.
      Returns:
      the value of the serviceName record component
    • serviceVersion

      public String serviceVersion()
      Returns the value of the serviceVersion record component.
      Returns:
      the value of the serviceVersion record component
    • exporterSslContext

      public Function<JsonValue,SSLContext,JsonException> exporterSslContext()
      Returns the value of the exporterSslContext record component.
      Returns:
      the value of the exporterSslContext record component
    • exporterProxyInfo

      Returns the value of the exporterProxyInfo record component.
      Returns:
      the value of the exporterProxyInfo record component