| MAX_QUERY_LENGTH | = | 16384 |
| RECORD_FOR | = | [:raw, :obfuscated].freeze |
| KNOWN_OPERATIONS | = | [ 'alter', 'select', 'update', 'delete', 'insert', 'create', 'show', 'set', 'exec', 'execute', 'call' |
| SQL_COMMENT_REGEX | = | Regexp.new('/\*.*?\*/', Regexp::MULTILINE).freeze |
| EMPTY_STRING | = | ''.freeze |
Properly encode, truncate, and dup the incoming query. Take care not to the dup the query more than once as correctly encoded may also dup the query.
Perform this in the runtime environment of a managed application, to explain the sql statement executed within a node of a transaction sample. Returns an array of two arrays. The first array contains the headers, while the second consists of arrays of strings for each column returned by the explain query. Note this happens only for statements whose execution time exceeds a threshold (e.g. 500ms) and only within the slowest transaction in a report period, selected for shipment to New Relic