Differences between MicroProfile 4.0 and 3.3

If you are updating your application from using MicroProfile 3.3 features to using MicroProfile 4.0 features, changes in API behavior might require you to update your application code.

Differences between MicroProfile Fault Tolerance 3.0 and 2.1

The following table lists the MicroProfile Fault Tolerance 2.1 metric names and the corresponding MicroProfile Fault Tolerance 3.0 metric names. It also lists the corresponding Prometheus names and metric types for each MicroProfile Fault Tolerance version:

Metrics differences between MicroProfile Fault Tolerance 2.1 and MicroProfile Fault Tolerance 3.0
mpFaultTolerance-2.1 namempFaultTolerance-2.1 Prometheus Name(s)mpFaultTolerance-2.1 TypempFaultTolerance-3.0 namempFaultTolerance-3.0 Prometheus Name(s)mpFaultTolerance-3.0 Type
ft.<name>.invocations.total
application_ft_<name>_invocations_total

Counter

ft.invocations.total{
    method="<name>",
    result=["valueReturned"|"exceptionThrown"],
    fallback=["applied"|"notApplied"|"notDefined"]
}
base_ft_invocations_total{
    method="<name>",
    result=["valueReturned"|"exceptionThrown"],
    fallback=["applied"|"notApplied"|"notDefined"]
}

Counter

ft.<name>.invocations.failed.total
application_ft_<name>_invocations_failed_total

Counter

ft.<name>.fallback.calls.total
application_ft_<name>_fallback_calls_total

Counter

ft.<name>.bulkhead.callsAccepted.total
application_ft_<name>_bulkhead_callsAccepted_total

Counter

ft.bulkhead.calls.total{
    method="<name>",
    bulkheadResult=["accepted"|"rejected"]
}
base_ft_bulkhead_calls_total{
    method="<name>",
    bulkheadResult=["accepted"|"rejected"]
}

Counter

ft.<name>.bulkhead.callsRejected.total
application_ft_<name>_bulkhead_callsRejected_total

Counter

ft.<name>.bulkhead.concurrentExecutions
application_ft_<name>_bulkhead_concurrentExecutions

Gauge

ft.bulkhead.executionsRunning{method="<name>"}
base_ft_bulkhead_executionsRunning{method="<name>"}

Gauge

ft.<name>.bulkhead.waitingQueue.population
application_ft_<name>_bulkhead_waitingQueue_population

Gauge

ft.bulkhead.executionsWaiting{method="<name>"}
base_ft_bulkhead_executionsWaiting{method="<name>"}

Gauge

ft.<name>.bulkhead.executionDuration
application_ft_<name>_bulkhead_executionDuration_mean_seconds
application_ft_<name>_bulkhead_executionDuration_max_seconds
application_ft_<name>_bulkhead_executionDuration_min_seconds
application_ft_<name>_bulkhead_executionDuration_stddev_seconds
application_ft_<name>_bulkhead_executionDuration_seconds_count
application_ft_<name>_bulkhead_executionDuration_seconds{
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

ft.bulkhead.runningDuration{method="<name>"}
base_ft_bulkhead_runningDuration_min_seconds{method="<name>"}
base_ft_bulkhead_runningDuration_max_seconds{method="<name>"}
base_ft_bulkhead_runningDuration_mean_seconds{method="<name>"}
base_ft_bulkhead_runningDuration_stddev_seconds{method="<name>"}
base_ft_bulkhead_runningDuration_seconds_count{method="<name>"}
base_ft_bulkhead_runningDuration_seconds_sum{method="<name>"}
base_ft_bulkhead_runningDuration_seconds{
    method="<name>",
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

ft.<name>.bulkhead.waiting.duration
application_ft_<name>_bulkhead_waitingDuration_mean_seconds
application_ft_<name>_bulkhead_waitingDuration_max_seconds
application_ft_<name>_bulkhead_waitingDuration_min_seconds
application_ft_<name>_bulkhead_waitingDuration_stddev_seconds
application_ft_<name>_bulkhead_waitingDuration_seconds_count
application_ft_<name>_bulkhead_waitingDuration_seconds{
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

ft.bulkhead.waitingDuration{method="<name>"}
base_ft_bulkhead_waitingDuration_min_seconds{method="<name>"}
base_ft_bulkhead_waitingDuration_max_seconds{method="<name>"}
base_ft_bulkhead_waitingDuration_mean_seconds{method="<name>"}
base_ft_bulkhead_waitingDuration_stddev_seconds{method="<name>"}
base_ft_bulkhead_waitingDuration_seconds_count{method="<name>"}
base_ft_bulkhead_waitingDuration_seconds_sum{method="<name>"}
base_ft_bulkhead_waitingDuration_seconds{
    method="<name>",
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

ft.<name>.circuitbreaker.callsFailed.total
application_ft_<name>_circuitbreaker_callsFailed_total

Counter

ft.circuitbreaker.calls.total{
    method="<name>",
    circuitBreakerResult=["success"|"failure"|"circuitBreakerOpen"]
}
base_ft_circuitbreaker_calls_total{
    method="<name>",
    circuitBreakerResult=["success"|"failure"|"circuitBreakerOpen"]
}

Counter

ft.<name>.circuitbreaker.callsPrevented.total
application_ft_<name>_circuitbreaker_callsPrevented_total

Counter

ft.<name>.circuitbreaker.callsSucceeded.total
application_ft_<name>_circuitbreaker_callsSucceeded_total

Counter

ft.<name>.circuitbreaker.closed.total
application_ft_<name>_circuitbreaker_closed_total_seconds

Gauge

ft.circuitbreaker.state.total{
    method="<name>",
    state=["open"|"closed"|"halfOpen"]
}
base_ft_circuitbreaker_state_total_seconds{
    method="<name>",
    state=["open"|"closed"|"halfOpen"]
}

Gauge

ft.<name>.circuitbreaker.halfOpen.total
application_ft_<name>_circuitbreaker_halfOpen_total_seconds

Gauge

ft.<name>.circuitbreaker.open.total
application_ft_<name>_circuitbreaker_open_total

Gauge

ft.<name>.circuitbreaker.opened.total
application_ft_<name>_circuitbreaker_opened_total

Counter

ft.circuitbreaker.opened.total{method="<name>"}
base_ft_circuitbreaker_opened_total{method="<name>"}

Counter

ft.<name>.retry.callsFailed.total
application_ft_<name>_retry_callsFailed_total

Counter

ft.retry.calls.total{
    method="<name>",
    retried=["true"|"false"],
    retryResult=["valueReturned"
               |"exceptionNotRetryable"
               |"maxRetriesReached"
               |"maxDurationReached"]
}
base_ft_retry_calls_total{
    method="<name>",
    retried=["true"|"false"],
    retryResult=["valueReturned"
                |"exceptionNotRetryable"
                |"maxRetriesReached"
                |"maxDurationReached"]
}

Counter

ft.<name>.retry.callsSucceededNotRetried.total
application_ft_<name>_retry_callsSucceededNotRetried_total

Counter

ft.<name>.retry.callsSucceededRetried.total
application_ft_<name>_retry_callsSucceededRetried_total

Counter

ft.<name>.retry.retries.total
application_ft_<name>_retry_retries_total

Counter

ft.retry.retries.total{method="<name>"}
base_ft_retry_retries_total{method="<name>"}

Counter

ft.<name>.timeout.callsNotTimedOut.total
application_ft_<name>_timeout_callsNotTimedOut_total

Counter

ft.timeout.calls.total{
    method="<name>",
    timedOut=["true"|"false"]
}
base_ft_timeout_calls_total{
    method="<name>",
    timedOut=["true"|"false"]
}

Counter

ft.<name>.timeout.callsTimedOut.total
application_ft_<name>_timeout_callsTimedOut_total

Counter

ft.<name>.timeout.executionDuration
application_ft_<name>_timeout_executionDuration_mean_seconds
application_ft_<name>_timeout_executionDuration_max_seconds
application_ft_<name>_timeout_executionDuration_min_seconds
application_ft_<name>_timeout_executionDuration_stddev_seconds
application_ft_<name>_timeout_executionDuration_seconds_count
application_ft_<name>_timeout_executionDuration_seconds{
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

ft.timeout.executionDuration{method="<name>"}
base_ft_timeout_executionDuration_mean_seconds{method="<name>"}
base_ft_timeout_executionDuration_max_seconds{method="<name>"}
base_ft_timeout_executionDuration_min_seconds{method="<name>"}
base_ft_timeout_executionDuration_stddev_seconds{method="<name>"}
base_ft_timeout_executionDuration_seconds_count{method="<name>"}
base_ft_timeout_executionDuration_seconds{
    method="<name>",
    quantile=["0.5"|"0.75"|"0.95"|"0.98"|"0.99"|"0.999"]
}

Histogram

Differences between MicroProfile Config 2.0 and 1.4

Two key sets of changes might impact the existing configuration when you upgrade to the mpConfig 2.0 feature. The changes are in the implementation and in the specification.

SmallRye implementation of the specification

Open Liberty implements the MicroProfile Config specification for application configuration from different configuration sources. In previous versions, Open Liberty implemented the specification in its own codebase.

However, for MicroProfile Config 2.0, Open Liberty consumes SmallRye implementation of the specification to produce the mpConfig 2.0 feature. Any MicroProfile Config functionality that Open Liberty implemented beyond the scope of the specification is lost from the mpConfig 2.0 feature.

AtomicInteger and AtomicLong converters no longer provided

Converters for the AtomicInteger and AtomicLong properties are no longer provided for MicroProfile Config 2.0 because these properties are not widely used. Converting an injected value to one of these types of properties might throw the exception SRCFG02006: The property yourProperty cannot be converted to class java.util.concurrent.atomic.AtomicInteger/AtomicLong. If you need to convert a String type to AtomicInteger or AtomicLong type, you can convert to Integer or Long type. Then, create an AtomicInteger or AtomicLong type from the Integer or Long type. Alternatively, you can create your own Converter for the AtomicInteger and AtomicLong properties.

In the MircoProfile Config feature, versions 1.4 and earlier], converters are provided for AtomicInteger and AtomicLong properties.

Caching discontinued

In the mpConfig 2.0 feature, caching is discontinued. Values that are looked up from MicroProfile Config are no longer cached.

In the mpConfig feature, versions 1.4 and earlier, requests made for the same configuration key return the same object up to 5-seconds duration, without calling the configuration sources.

Converters of subtypes unavailable

In the mpConfig 2.0 feature, when a converter for a specific type is not available, converters of its subtypes cannot be used.

Converters for subtypes are available in the mpConfig feature, versions 1.4 and earlier. For example, a Converter that is registered for the type Dog extends a type Animal. When a type Animal is injected, the Dog Converter is used,

@Inject
@ConfigProperty(name = "DOG_KEY")
Animal myAnimal;

Incompatible changes

Changes in the MicroProfile Config 2.0 specification introduced some incompatibility with earlier versions. Some of these changes are by-products of new functions, and others are intentional specification clarifications and changes.

ConfigSource.getPropertyNames() no longer default method

In the MicroProfile Config 2.0 specification, ConfigSource.getPropertyNames() method is no longer a default method that is provided by the specification. Any custom configuration sources that use this method need to implement the method, otherwise a java.lang.AbstractMethodError is thrown.

In the MicroProfile Config versions 1.4 and earlier, ConfigSource.getPropertyNames() method is provided by the specification, by default.

Property expression feature

In the MicroProfile Config 2.0 specification, the number of recursion lookups is limited for composed expressions. Implementations are limited to 32. When the number of allowed lookups exceeds the limit, an IllegalArgumentException error is thrown. Variable replacement in config values is supported through the property expressions feature. This replacement allows config values to reference other config property values by using the ${} syntax with a maximum recursive depth of 32.

In MicroProfile Config , versions 1.4 and earlier, the property expression feature is not available.

Configuration property value conversion rules updated

In the MicroProfile Config 2.0 specification, configuration property value conversion rules are updated. The empty value and other special characters are no longer valid for particular return types. For example, attempting to call Config.getValue() for a config property which is defined as the empty String ("") now throws a java.util.NoSuchElementException error.

In MicroProfile Config versions 1.4 and earlier, empty value and other special characters were valid for particular return types.