Open ray58750034 opened 1 year ago
Original code: https://github.com/aspecto-io/opentelemetry-ext-js/blob/master/packages/instrumentation-sequelize/src/utils.ts#L3
Suggest regex:
query.match(/(?<=(update|(?<!distinct\s+)from|join|truncate|into)\s+)\"?\`?(\w+)\"?\`?/gi);
Expect to work with following sqls:
UPDATE tableName SET field=value; INSERT INTO tableName ("field") VALUES (value); SELECT * FROM tableName WHERE field IS DISTINCT FROM value;
Original code: https://github.com/aspecto-io/opentelemetry-ext-js/blob/master/packages/instrumentation-sequelize/src/utils.ts#L3
Suggest regex:
Expect to work with following sqls: