spring-projects / spring-projects/spring-boot

Add support for Reactor Pool metrics

Open
#32,072 13 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
81.5k
Forks
42.7k
Avg merge
2d 4h
Merged PRs (30d)
65

Description

The R2DBC connection pool metrics exposed by Actuator are currently very limited, we only get a few gauges about the current pool status as exposed by io.r2dbc.pool.PoolMetrics. Other important metrics like number and latency of connection acquire/allocation operations are missing.

I looked through the R2DBC ConnectionPool source code and found that the ConnectionFactory.Builder has a method to accept a reactor.pool.PoolMetricsRecorder, which can be used to track those metrics.

Would you consider integrating this with Actuator? It looks like it should be pretty straight-forward to implement a PoolMetricsRecorder that uses Micrometer's MeterRegistry to track those metrics.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how Spring Boot Actuator currently exposes R2DBC ConnectionPool and PoolMetrics data. Read the ConnectionFactory.Builder integration point for PoolMetricsRecorder and the MeterRegistry usage described in the issue. Done means Reactor pool acquire/allocation counts and latencies are exposed through Actuator metrics alongside the existing pool gauges.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.