iovisor / iovisor/bcc

Tracing queries within transactions with dbslower

Open
#4,256 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

I am trying to trace transactions for MySQL v8.0.28 but only START TRANSACTION and COMMIT are detected, while the queries in the transactions are not detected. As MySQL dropped support for Dtrace for v8.0+ I am using the alternative with uprobes. Is there a way to adapt the tracing to include the queries within a transaction aswell, e.g. by adapting the mysql_func_name?

Output:
python3 dbslower.py -x /usr/local/mysql/bin/mysqld -m 0 mysql
Tracing database queries for application /usr/local/mysql/bin/mysqld slower than 0 ms...
TIME(s) PID MS QUERY
3.581273 14166 0.189 b'START TRANSACTION'
3.584225 14166 0.193 b'START TRANSACTION'
3.610867 14166 20.043 b'COMMIT'
3.611337 14166 22.350 b'COMMIT'

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with dbslower.py, the mysql_func_name handling, and the uprobes path used by the shown command. Reproduce the MySQL 8.0.28 trace and inspect why only START TRANSACTION and COMMIT are reported. Done means queries executed within a transaction are also detected and represented in the output.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, python
Domain
databases, observability, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.