Skip to content
Bluetape4k docs1.11

Micrometer Metrics Extensions

Latest stable Based on Bluetape4k release 1.11.0

A module that provides application performance measurement and observability features using Micrometer and the Observation API. This manual connects that purpose to the current build, source entry points, tests, configuration resources, and lifecycle evidence instead of duplicating the README feature list.

Use bluetape4k-micrometer when the application needs client lifecycle, reconnect policy, backpressure, retries, and observability. Start with the source entry points below and confirm that their ownership and failure contracts match the calling component. Prefer a smaller standard-library or already-adopted module when it satisfies the same contract without another runtime boundary.

dependencies {
implementation(platform("io.github.bluetape4k:bluetape4k-dependencies:<version>"))
implementation("io.github.bluetape4k:bluetape4k-micrometer")
}

Gradle project path: :bluetape4k-micrometer. Source directory: infra/micrometer.

The first source-level concepts to inspect are KeyValueSupport, TimerExtensions, Cache2kCacheMetrics, MeasuredCall, MeasuredCallAdapter, MetricsRecorder, MicrometerRetrofitMetricsFactory, and MicrometerRetrofitMetricsRecorder. File names are navigation anchors; read each declaration and its tests before treating it as a public contract.

Add the coordinate above, refresh Gradle, and start from the smallest entry point that owns the required task. Open KeyValueSupport first; it is a concrete source entry point for the module.

Entry pointWhat to verify
KeyValueSupportInspect this declaration’s constructors, functions, and ownership contract.
TimerExtensionsInspect this declaration’s constructors, functions, and ownership contract.
Cache2kCacheMetricsInspect this declaration’s constructors, functions, and ownership contract.
MeasuredCallInspect this declaration’s constructors, functions, and ownership contract.
MeasuredCallAdapterInspect this declaration’s constructors, functions, and ownership contract.
MetricsRecorderInspect this declaration’s constructors, functions, and ownership contract.
MicrometerRetrofitMetricsFactoryInspect this declaration’s constructors, functions, and ownership contract.
MicrometerRetrofitMetricsRecorderInspect this declaration’s constructors, functions, and ownership contract.
OutcomeInspect this declaration’s constructors, functions, and ownership contract.
RetrofitCallMetricsCollectorInspect this declaration’s constructors, functions, and ownership contract.

The README evidence is organized around Overview, Architecture, Core Class Structure, Metric Collection Flow, Retrofit2 Metric Collection Sequence, Coroutine Observation Flow, Dependency, Key Features, 1. Timer Extensions, and Measuring Execution Time of Suspend Functions. Use those topics as a navigation map, then confirm behavior in source and tests. Keep adoption narrow and connect owned resources to the caller lifecycle.

The current build declares these integration edges:

implementation(platform(libs.spring.boot.dependencies))
api(project(":bluetape4k-core"))
implementation(project(":bluetape4k-cache-core"))
api(libs.micrometer.core)
implementation(libs.micrometer.registry.prometheus)
implementation(libs.micrometer.registry.datadog)
api(libs.micrometer.observation)
implementation(libs.micrometer.observation.test)
implementation(libs.micrometer.tracing.bridge.otel)
api(libs.micrometer.context.propagation) // thread local <-> reactor 등 상이한 환경에서 context 전파를 위해 사용
implementation(libs.cache2k.core)
implementation(project(":bluetape4k-retrofit2"))

Treat compileOnly edges as caller-provided capabilities and verify runtime availability before using their APIs.

No module-level configuration resource was found under src/main/resources. Configuration is supplied through constructors, builders, function arguments, or the integrating framework; confirm defaults in source.

Failure semantics are defined by the linked entry points and tests, not inferred from the artifact name. Keep cancellation and timeout signals intact, close owned resources, and translate backend exceptions only at a boundary that can add a stable domain contract. Use the test anchors below to verify the exact behavior before adding retries or fallbacks.

Track connection state, queue depth, retries, timeouts, remote errors, and graceful shutdown. Keep capacity, timeout, retry, and shutdown settings next to the component that owns the resource; avoid process-wide defaults that hide which caller accepted the trade-off.

Run the module test task:

Terminal window
./gradlew :bluetape4k-micrometer:test --no-configuration-cache

Representative test anchors:

No dedicated workshop path is registered in the manual manifest. Use the module README and the representative tests above as runnable evidence.

This page documents the repository state represented by the linked source and tests. It does not turn optional backends into application defaults or claim performance without a benchmark artifact. Re-check compatibility and lifecycle notes when the module version changes.

These diagrams are loaded directly from README assets published with the 1.11.0 release and pinned to its immutable commit. They describe this manual’s released structure and runtime flows, not later Snapshot changes. Select a preview to open the SVG at the same release commit.

Core Class Structure diagram

Release README: infra/micrometer/README.md

Metric Collection Flow diagram

Release README: infra/micrometer/README.md

Micrometer Module Architecture diagram

Release README: infra/micrometer/README.md

Retrofit2 Metric Collection Sequence diagram

Section titled “Retrofit2 Metric Collection Sequence diagram”

Retrofit2 Metric Collection Sequence diagram

Release README: infra/micrometer/README.md

Coroutine Observation Flow diagram

Release README: infra/micrometer/README.md

Event Telemetry Sequence diagram

Release README: infra/micrometer/README.md