Skip to content

Conversation

@rajeswari2904
Copy link

FIxes Issue #13512

  • Refactored DataSource instrumentation from BeanPostProcessor to explicit proxy wrapping.
  • Added ProxyFactory to wrap the DataSource to prevent double wrapping and scoped proxy issues.
  • Ensured compatibility with Spring AOP by invoking methods via reflection on the proxy.
  • Maintained configuration-driven settings for statement sanitization, query parameter capture, and transaction instrumentation.
  • Improved handling for multiple DataSources and scoped proxies.
  • Preserved original bean order with minimal impact on other bean post-processors.
  • This change resolves issues related to double instrumentation and method interception failures.
  • Simplified debugging and enhanced maintainability by making DataSource wrapping explicit.

@rajeswari2904 rajeswari2904 requested a review from a team as a code owner June 6, 2025 09:26
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 6, 2025

CLA Not Signed

@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Jun 6, 2025
@otelbot-java-instrumentation
Copy link
Contributor

🔧 The result from spotlessApply was committed to the PR branch.

…/io/opentelemetry/instrumentation/spring/autoconfigure/internal/instrumentation/jdbc/DataSourcePostProcessor.java
@laurit
Copy link
Contributor

laurit commented Jun 6, 2025

Firstly the title of the PR is misleading. BeanPostProcessor is still there and not replaced with anything. Secondly a test should be added. Thirdly there should be a comment in the code explaining why such proxying is used.

@rajeswari2904 rajeswari2904 deleted the 13512-fix branch June 6, 2025 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants