microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
324 stars 141 forks source link

Support for tedious (MS-SQL) and Pino? #1078

Open DevRCRun opened 1 year ago

DevRCRun commented 1 year ago

Thanks for all your work on the new version. I see the following list designated for bundled support in the preview / beta 👍

Distributed Tracing HTTP/HTTPS MongoDB MySQL Postgres Redis Redis-4 Azure SDK

I'm a little hazy on what is necessary to support MS-SQL (tedious) and Pino, which look to be available in open telemetry. Will it be enough to add a TraceHandler in ApplicationInsightsClient for @opentelemetry/instrumentation-pino and @opentelemetry/instrumentation-tedious per the new readme or does this come with caveats?

hectorhdzg commented 1 year ago

@DevRCRun you can take a look at the sample code we have to add ExpressInstrumentation here, you can add any other OpenTelemetry Instrumentation the same way

dmunch commented 1 year ago

Be aware though that @opentelemetry/instrumentation-pino only adds a few tracing specific records to the pino record - it does not help you in sending logs created through the pino logging interface to application insights, like the built-in log instrumentations for console, winston and bunyan would do.

See also https://github.com/microsoft/node-diagnostic-channel/issues/118#issuecomment-1600730013