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, org.forgerock.http.handler.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, org.forgerock.http.handler.HttpClientHandler.ProxyInfo, JsonException> exporterProxyInfo) Validates the passed values. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Function<JsonValue, org.forgerock.http.handler.HttpClientHandler.ProxyInfo, JsonException> 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, org.forgerock.http.handler.HttpClientHandler.ProxyInfo, JsonException> exporterProxyInfo) Validates the passed values.- Parameters:
serviceName- see the description inOpenTelemetryUtils.ServiceConfig's javadocserviceVersion- see the description inOpenTelemetryUtils.ServiceConfig's javadocexporterSslContext- see the description inOpenTelemetryUtils.ServiceConfig's javadocexporterProxyInfo- see the description inOpenTelemetryUtils.ServiceConfig's javadoc
-
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
-
hashCode
-
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
public Function<JsonValue, org.forgerock.http.handler.HttpClientHandler.ProxyInfo, JsonException> exporterProxyInfo()Returns the value of theexporterProxyInforecord component.- Returns:
- the value of the
exporterProxyInforecord component
-