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

Add support for MyBatis framework #10186

Closed
steverao opened this issue Jan 7, 2024 · 4 comments · Fixed by #10258
Closed

Add support for MyBatis framework #10186

steverao opened this issue Jan 7, 2024 · 4 comments · Fixed by #10258
Assignees
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request new instrumentation

Comments

@steverao
Copy link
Contributor

steverao commented Jan 7, 2024

Is your feature request related to a problem? Please describe.

As a widely used persistence layer framework, MyBatis is widely used. Currently, the Span focus for database calls is only specific database types. For example, when using the mariadb client to call the database, the application layer will take a lot of time, but the specific database call will take very little time. It is not clear where the intermediate time is spent. , if the Mybatis can be supported, the time-consuming support of this type of framework can be clearly displayed to users. Will the community consider supporting it?

Describe the solution you'd like

Add support for MyBatis framework

Describe alternatives you've considered

No response

Additional context

No response

@steverao steverao added enhancement New feature or request needs triage New issue that requires triage labels Jan 7, 2024
@AlchemyDing
Copy link
Member

Project is here: https://github.com/mybatis/mybatis-3

@laurit
Copy link
Contributor

laurit commented Jan 8, 2024

For example, when using the mariadb client to call the database, the application layer will take a lot of time, but the specific database call will take very little time.

Are you sure that this extra time is spent in MyBatis? I would have thought that MyBatis itself doesn't do much and even if you create spans for it they'd not be much different from the underlying jdbc spans.

@steverao
Copy link
Contributor Author

steverao commented Jan 8, 2024

For example, when using the mariadb client to call the database, the application layer will take a lot of time, but the specific database call will take very little time.

Are you sure that this extra time is spent in MyBatis? I would have thought that MyBatis itself doesn't do much and even if you create spans for it they'd not be much different from the underlying jdbc spans.

I did a preliminary implementation and found that this time-consuming process is actually much more time-consuming than underlying JDBC. For a simple application, the overall time consumption of Mybatis is about 2 times that of pure JDBC. The result are as follows:
image
If we support relevant span, users will have a complete global perspective, which includes the connection pool acquisition time and database statement execution time, which can help users to better understand the complete time-consuming of their database-related operations.

@laurit laurit added contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome new instrumentation and removed needs triage New issue that requires triage labels Jan 8, 2024
@steverao
Copy link
Contributor Author

steverao commented Jan 8, 2024

Please assign it to me, I will complete it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome enhancement New feature or request new instrumentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants