-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Description
Enhance APM SQL driver instrumentation to prepend correlation metadata as SQL comments to all database queries. This enables bidirectional correlation between APM traces and QPM performance metrics without cardinality impact.
Requirements
Metadata comment
Prepend a comment to the SQL statement string that contains the following:
- the transaction id
- the span id
- the service name (app name)
For example:
/* nr_trace_id=7f8a9b2c1d3e4f5a,nr_span_id=abc123def456,nr_service=user-api */ SELECT id, name FROM users where user_id = 1;
Configuration
A new config section needs to be added to the transaction_tracer stanza to configure the new functionality.
transaction_tracer:
sql_metadata_comments:
enabled: false
excludes:
enabled-trueto enable SQL metadata comment generation, Default isfalseexcludes- comma separated list of regular expressions; if a SQL statement matches one of these regular expressions no comment is prepended
Design Consideration/Limitations
excludesconfig option can be a stretch goal after basic functionality is implemented- Support for all SQL products supported by the agent (Postgres, MySQL, Oracle, SqlServer...)
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
In Sprint