Skip to content

AaronBernabeu/apm-sql-lexer

Repository files navigation

SQL Lexer for APM agents

Simple and lightweight parser for span names in APM transactions written in PHP.

Installation

Install via [composer]

composer require aaronidas/apm-sql-lexer

How to use

Signature::parse($query);

Example:

$spanName = Signature::parse('SELECT * FROM foo');
var_dump($spanName);
// output: SELECT FROM foo
Reference doc for development:

Reference doc

  • PostgreSQL dollar quoting not implemented yet