fix(laravel): fix trailing space in span name for unknown SQL operations in QueryWatcher#627
Merged
bobstrecansky merged 2 commits intoJun 21, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #627 +/- ##
=========================================
Coverage 80.45% 80.46%
- Complexity 1668 1669 +1
=========================================
Files 116 116
Lines 6264 6265 +1
=========================================
+ Hits 5040 5041 +1
Misses 1224 1224 Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
bobstrecansky
approved these changes
Jun 21, 2026
zigzagdev
deleted the
fix/laravel-query-watcher-unknown-operation-span-name
branch
July 3, 2026 03:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Content
PRAGMA,EXPLAIN,CREATE),$operationNamewas set tonull, causing the span name to be built as'sql ' . null = 'sql '(trailing space)'sql <OPERATION>'for known operations,'sql'for unknown ones.What I have done
Before
After
Test Results
php@33736e758e63:/usr/src/myapp/src/Instrumentation/Laravel$ vendor/bin/phpunit --filter test_unknown_sql_operation_span_name tests/Integration/LaravelInstrumentationTest.php PHPUnit 9.6.34 by Sebastian Bergmann and contributors. Runtime: PHP 8.1.34 Configuration: /usr/src/myapp/src/Instrumentation/Laravel/phpunit.xml.dist . 1 / 1 (100%) Time: 00:02.467, Memory: 24.00 MB OK (1 test, 2 assertions) php@33736e758e63:/usr/src/myapp/src/Instrumentation/Laravel$