Simple and lightweight parser for span names in APM transactions written in PHP.
Install via [composer]
composer require aaronidas/apm-sql-lexer
Signature::parse($query);
Example:
$spanName = Signature::parse('SELECT * FROM foo');
var_dump($spanName);
// output: SELECT FROM foo
- PostgreSQL dollar quoting not implemented yet