microsoft / ApplicationInsights-node.js

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

[beta] AppInsights SDK vs OpenTelemetry SDK #1135

Open carlo-quinonez opened 1 year ago

carlo-quinonez commented 1 year ago

Our team is starting a couple of new projects and we're trying to decide between the OpenTelemtery options for Application Insights.

  1. Use the OpenTelemeetry SDK with Azure Monitor Exporter as described in the docs.
  2. Use applicationinsights@beta

Besides the differences in the API, are there other tradeoffs we should be aware of between these two approaches?

hectorhdzg commented 1 year ago

@carlo-quinonez new Application Insights beta is using OpenTelemetry internally, it is a pre assembled product including several OpenTelemetry packages, making it easier for Azure Monitor customers to start using OpenTelemetry, there is also functionalities available included in Application Insights, like sampling, pre aggregated metrics, etc. Currently also have functionality that is still not available in OpenTelemetry like logs, currently not available in Javascript side, eventually we will migrate to start using OpenTelemetry when available.

ssijak commented 7 months ago

@hectorhdzg how can I add instrumentations to applicationinsights

Ciantic commented 2 weeks ago

This question is still relevant, maybe more relevant.

Microsoft Docs is calling applicationinsights package a "classic" version Application Insights SDK (Classic API) > NodeJS, and there is a note:

Adopting OpenTelemetry now prevents having to migrate at a later date. (taken from here)

But then, it has a feature support table that makes OpenTelemetry approach not so tempting yet because it has a lot of ❌ marks on NodeJS column.

hectorhdzg commented 2 weeks ago

@Ciantic Application Insights Node.js SDK V3 is a wrapper on top of @azure/monitor-opentelemetry package, is the path for easy migration to OpenTelemetry, is designed for customers who are not using a lot of configurations and customizations in the SDK, for customers with more advanced telemetry we are suggesting migrating directly to OpenTelemetry using @azure/monitor-opentelemetry, that is called OpenTelemetry Distro in the documentation. Most non supported marks in Node.js feature support table were not supported by Application Insights package either, we are working on adding support for more features right now, and all of them will be available in both OpenTelemetry Distro and Application Insights Node.js > v3, like live metrics filtering that would be available next release.

hectorhdzg commented 2 weeks ago

@hectorhdzg how can I add instrumentations to applicationinsights

Sorry for late reply @ssijak, this message felt into the cracks, you can follow the documentation available here