Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ export function getQuerySpanName(
}

function parseNormalizedOperationName(queryText: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your commit message says you're changing how to get the "span name", but your changes are on the "operation name" function (even if that is later used to get the span), so probably worth updating commit message/PR title to reflect that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

const sqlCommand = queryText.split(' ')[0].toUpperCase();
const indexOfFirstSpace = queryText.indexOf(' ');
let sqlCommand =
indexOfFirstSpace === -1
? queryText
: queryText.slice(0, indexOfFirstSpace);
sqlCommand = sqlCommand.toUpperCase();

// Handle query text being "COMMIT;", which has an extra semicolon before the space.
return sqlCommand.endsWith(';') ? sqlCommand.slice(0, -1) : sqlCommand;
Expand Down