elastic / elastic/apm-agent-nodejs

'mssql' instrumentation improvements

Open
#2,493 0 comments 0 reactions 0 assignees View on GitHub
agent-nodejs
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

My understanding is that a Node.js dev would use https://www.npmjs.com/package/mssql as a client for SQL Server. We instrument tedious (https://www.npmjs.com/package/tedious) which `mssql` uses by default and is "actively maintained and production ready. Platform independent, runs everywhere Node.js runs. Officially supported by Microsoft."

Some potential improvements:
- [ ] Test with `mssql` module usage. It has await, promises, callback, streaming styles (https://github.com/tediousjs/node-mssql#examples). Does our wrapping of the underlying tedious suffice?
- [ ] There is an optional binary driver other than `tedious` -- https://github.com/tediousjs/node-mssql#microsoft--contributors-node-v8-driver-for-nodejs-for-sql-server -- that can be used via `require('mssql/msnodesqlv8')`. Is it important to instrument usage via this driver? If so, do we instrument `'mssql/msnodesqlv8'` specifically to not conflict with `tedious` instrumentation.
- [ ] The tedious instrumentation should captureError and set span.outcome in the query callback.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.