Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@victor-noel-pfx

Description

@victor-noel-pfx

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions