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

Unable to View Queries in Call Tree for a Spring Boot Application #10191

Closed
Jinwook94 opened this issue Aug 3, 2023 · 4 comments
Closed

Unable to View Queries in Call Tree for a Spring Boot Application #10191

Jinwook94 opened this issue Aug 3, 2023 · 4 comments

Comments

@Jinwook94
Copy link

Jinwook94 commented Aug 3, 2023

Summary

  • 핀포인트 웹에서 개별 요청을 선택 후 Call Tree를 보면 쿼리가 조회되지 않습니다. Call Tree에서 쿼리까지 확인하려면 어떻게 해야하나요?
    JPA 사용과 관련 있는 것 같은데 어떻게 해결해야 할지 모르겠습니다.
  • When I select an individual request in Pinpoint and look at the Call Tree, the query that is sent to the actual DB (MariaDB) is not traced, but only up to TransactionAspectSupport.invokeWithinTransaction() in the SPRING_TX API. How can I see up to the query in the call tree?
    It seems to be related to using JPA, but I don't know how to solve it.

Versions

  • HBase: 1.4.9
  • Pinpoint Web: 2.5.2
  • Pinpoint Collector: 2.5.2
  • Pinpoint Agent: 2.5.2
  • Spring Boot: 2.7.3
  • MariaDB: 10.5.18
  • org.mariadb.jdbc:mariadb-java-client:3.0.7

Env.

image

Current Outcome

  • I am using Pinpoint to monitor a Spring Boot application which is using JPA(Hibernate) for MariaDB connections.
  • When I select an individual request in Pinpoint and look at the Call Tree, I don't see the actual query sent to the DB but only up to invokeWithinTransaction() method of which belongs to SPRING_TX API.
  • image
  • image

Expected Outcome

  • SQL queries shown in the call tree (demo)
  • image
  • image

Config file (Agent)

pinpoint-agent-2.5.2/profiles/release/pinpoint.config

#
# MARIADB
#
# Profile MariaDB
profiler.jdbc.mariadb=true
# Allow profiling of setautocommit.
profiler.jdbc.mariadb.setautocommit=true
# Allow profiling of commit.
profiler.jdbc.mariadb.commit=true
# Allow profiling of rollback.
profiler.jdbc.mariadb.rollback=true
# Trace bindvalues for MariaDB PreparedStatements (overrides profiler.jdbc.tracesqlbindvalue)
profiler.jdbc.mariadb.tracesqlbindvalue=true

Similar Issue

#9703

@Jinwook94 Jinwook94 changed the title Unable to View Actual Queries in Call Tree for a Spring Boot Application Unable to View Queries in Call Tree for a Spring Boot Application Aug 3, 2023
@emeroad
Copy link
Member

emeroad commented Aug 4, 2023

https://github.com/pinpoint-apm/pinpoint/tree/master/plugins/mariadb-jdbc

Could you check the driver support of Maria db?

@Jinwook94
Copy link
Author

Jinwook94 commented Aug 4, 2023

Thank you for your guidance in resolving the issue. After adjusting the MariaDB JDBC version, I can now see the actual query in the Call Tree.

Just to provide some additional information, I have tested multiple versions of the org.mariadb.jdbc:mariadb-java-client as follows:

org.mariadb.jdbc:mariadb-java-client version SQL Query Shown
3.1.4 x
3.1.0 x
3.0.7 x
3.0.3 x
2.7.9 o
2.7.0 o

It appears that from version 3.0.3 onwards, the SQL queries are not shown in the Call Tree.
So i think the current compatibility range for org.mariadb.jdbc:mariadb-java-client need to be changed to [1.1, 2.7]

@emeroad

Jinwook94 added a commit to Jinwook94/bootme that referenced this issue Aug 5, 2023
Pinpoint 호환 이슈로 버전 변경

참고:
pinpoint-apm/pinpoint#10191
@enaenen
Copy link

enaenen commented Aug 28, 2023

org.mariadb.jdbc:mariadb-java-client version SQL Query Shown
3.1.4 x
3.1.0 x
3.0.7 x
3.0.3 x
2.7.10 x
2.7.9 o
2.7.0 o

Also 2.7.10 version is not supported.

@jaehong-kim
Copy link
Contributor

@Jinwook94
#11577

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants