Package org.forgerock.opentelemetry
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 theServiceAttributes.SERVICE_NAMEproperty, for example IG. The value will be converted to lowercase before use.serviceVersion- The service version to use as a resource attribute for theServiceAttributes.SERVICE_VERSIONproperty.exporterSslContext- A transformation function that takes aJsonValuerepresenting the exporter config block and returns aSSLContextthat when notnull, will be applied to theOtlpHttpSpanExporterBuilder.exporterProxyInfo- A transformation function that takes aJsonValuerepresenting the exporter config block and returns aHttpClientHandler.ProxyInfothat when notnull, will be applied to theOtlpHttpSpanExporterBuilder.
- 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 Summary
ConstructorsConstructorDescriptionServiceConfig(String serviceName, String serviceVersion) Service specific configuration items to be used when setting up OpenTelemetry tracing.ServiceConfig(String serviceName, String serviceVersion, Function<JsonValue, SSLContext, JsonException> exporterSslContext, Function<JsonValue, HttpClientHandler.ProxyInfo, JsonException> exporterProxyInfo) Validates the passed values. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexporterProxyInforecord component.Returns the value of theexporterSslContextrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theserviceNamerecord component.Returns the value of theserviceVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
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
Service specific configuration items to be used when setting up OpenTelemetry tracing.- Parameters:
serviceName- The service name to use as a resource attribute for theServiceAttributes.SERVICE_NAMEproperty, for example IG. The value will be converted to lowercase before use.serviceVersion- The service version to use as a resource attribute for theServiceAttributes.SERVICE_VERSIONproperty.
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
serviceName
Returns the value of theserviceNamerecord component.- Returns:
- the value of the
serviceNamerecord component
-
serviceVersion
Returns the value of theserviceVersionrecord component.- Returns:
- the value of the
serviceVersionrecord component
-
exporterSslContext
Returns the value of theexporterSslContextrecord component.- Returns:
- the value of the
exporterSslContextrecord component
-
exporterProxyInfo
Returns the value of theexporterProxyInforecord component.- Returns:
- the value of the
exporterProxyInforecord component
-