-
Notifications
You must be signed in to change notification settings - Fork 91
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
Auto instrumentation for mysqli #318
base: main
Are you sure you want to change the base?
Auto instrumentation for mysqli #318
Conversation
intuibase
commented
Dec 4, 2024
•
edited
Loading
edited
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #318 +/- ##
============================================
- Coverage 79.60% 78.76% -0.85%
+ Complexity 729 605 -124
============================================
Files 69 60 -9
Lines 2952 2585 -367
============================================
- Hits 2350 2036 -314
+ Misses 602 549 -53
Flags with carried forward coverage won't be shown. Click here to find out more. see 9 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
$attributes = $tracker->getMySqliAttributes($mysqli); | ||
|
||
if ($transactionName) { | ||
$attributes['db.transaction.name'] = $transactionName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In reference to the discussion on SIG and the custom attribute db.transaction.name, I looked into it and found that there is no corresponding entity in sem-conv. I started digging deeper into the topic and discovered that this is typical for the MySQLi extension in PHP. PDO does not allow setting a transaction name.
I checked the code of mysqlnd (the base driver for MySQLi and PDO), and it seems that there is no such concept as a transaction name. In mysqlnd, this is implemented by setting a comment in the SQL code—it is not interpreted by the database itself as a name but is treated as a regular comment.
Therefore, I suspect it will not be possible to add this entity to the semantic conventions, as it is specific to this particular driver.