Skip to content

Commit 9303ddb

Browse files
authored
add compatibility note for jOOQ overload delegation (#6681)
See gh-6659 Signed-off-by: heechann <[email protected]>
1 parent 933700d commit 9303ddb

File tree

1 file changed

+11
-0
lines changed
  • docs/modules/ROOT/pages/reference

1 file changed

+11
-0
lines changed

docs/modules/ROOT/pages/reference/db.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ include::{include-core-test-java}/io/micrometer/core/instrument/binder/db/Metric
4040
include::{include-core-test-java}/io/micrometer/core/instrument/binder/db/MetricsDSLContextTest.java[tags=result, indent=0]
4141
-----
4242

43+
[IMPORTANT]
44+
====
45+
*Compatibility note for jOOQ versions.*
46+
47+
Some newly added jOOQ overloads (for example, `DefaultDSLContext#fetchValue(SelectField)`) may internally delegate to `select(...)`. When using builder-level instrumentation with `MetricsDSLContext`, such delegation can lead to **double instrumentation** and **tag loss** on the `jooq.query` timer.
48+
49+
**Recommendations**
50+
51+
- Use only the APIs **overridden by `MetricsDSLContext`** for building/executing queries (i.e., prefer methods explicitly overridden by `MetricsDSLContext`) so each query is timed exactly once with consistent tags. And, avoid relying on newer jOOQ overloads that may delegate to `select(...)`.
52+
====
53+
4354
[[db-postgres]]
4455
== PostgreSQL Instrumentation
4556

0 commit comments

Comments
 (0)