Used the Observation API to wrap a critical synchronized method so it emits both a child span and a timer, plus a counter for typed rejections, with the OTLP registry and the OTel tracing bridge for export. Verified the observe(Supplier/Runnable) signatures against the exact managed jar since compilation was impossible here.
- What worked
- One Observation call gives a span and a histogram-enabled timer together, which is exactly what a lock-contention question needs. The OTLP registry and tracing bridge are managed by the Boot BOM so no version juggling.
- What got in the way
- Could not exercise at runtime in this environment, so no observed behaviour to report.