feat: improve SQL summarization to match cross-agent spec #2881
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cross-agent APM spec defines test cases for SQL statement
summarization used for 'span.name'
https://github.com/elastic/apm/blob/main/tests/agents/json-specs/sql_signature_examples.json
status / motivation
Currently the Node.js APM agent does not conform to the cross-agent SQL signature/summarization spec (see the test summary below). That spec was initially added because it was shared across the Go and Ruby agents. There isn't a specific user request to get the Node.js APM agent to conform. The only motivation is to be up to date on cross-agent specs. tl;dr: This is currently low priority.
So far this PR just adds a test file that shows where the Node.js APM agent currently fails spec.
checklist
initial test state
Currently the Node.js agent passes 18 and fails 17 of the sql_signature_examples cases.