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_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 theServiceAttributes.SERVICE_VERSION
property.exporterSslContext
- A transformation function that takes aJsonValue
representing the exporter config block and returns aSSLContext
that when notnull
, will be applied to theOtlpHttpSpanExporterBuilder
.exporterProxyInfo
- A transformation function that takes aJsonValue
representing the exporter config block and returns aHttpClientHandler.ProxyInfo
that 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 boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexporterProxyInfo
record component.Returns the value of theexporterSslContext
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of theserviceName
record component.Returns the value of theserviceVersion
record component.final String
toString()
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_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 theServiceAttributes.SERVICE_VERSION
property.
-
-
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 theserviceName
record component.- Returns:
- the value of the
serviceName
record component
-
serviceVersion
Returns the value of theserviceVersion
record component.- Returns:
- the value of the
serviceVersion
record component
-
exporterSslContext
Returns the value of theexporterSslContext
record component.- Returns:
- the value of the
exporterSslContext
record component
-
exporterProxyInfo
Returns the value of theexporterProxyInfo
record component.- Returns:
- the value of the
exporterProxyInfo
record component
-