Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenTelemetryPreparedStatement and the returned ResultSet.getStatement() do not match #13580

Closed
victor-noel-pfx opened this issue Mar 25, 2025 · 0 comments · Fixed by #13646
Closed
Labels
bug Something isn't working needs triage New issue that requires triage

Comments

@victor-noel-pfx
Copy link

Describe the bug

Hi,

I noticed that the ResultSet returned by OpenTelemetryPreparedStatement.executeQuery(String) is not wrapped. It means that when one calls then ResultSet.getStatement() we get the wrapped statement instead of the OpenTelemetryPreparedStatement itself.

This can be problematic when we expect to get the same object, for example when statement are used as a Map's key and we want to find back some information.

One example of the problem this creates can be seen here: https://hibernate.atlassian.net/browse/HHH-19280

Steps to reproduce

N/A

Expected behavior

ResultSet.getStatement() returns the same object that created the ResultSet

Actual behavior

ResultSet.getStatement() does not return the same object that created the ResultSet

Javaagent or library instrumentation version

2.14.0-alpha

Environment

Additional context

No response

@victor-noel-pfx victor-noel-pfx added bug Something isn't working needs triage New issue that requires triage labels Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that requires triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant