microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js
MIT License
321 stars 138 forks source link

_APPRESOURCEPREVIEW_ appearing in metrics when upgrading from 2.x to 3.0.1 #1322

Open skhilliard opened 1 month ago

skhilliard commented 1 month ago

I am upgrading from 2.x to 3.0.1 and am seeing these odd entries in metrics...what are they?

image

...also...would it be right to assume that the npm package applicationinsights-native-metrics is not supported with 3.x? What would be a suitable substitute?

JacksonWeber commented 1 month ago

Hi @skhilliard those metrics exist as part of the transition to OpenTelemetry under the hood for application insights. They're related to the OpenTelemetry concept of a Resource. The reason for the APPRESOURCEPREVIEW naming is simply that AppInsights ingestion renames the metric if the resources table has not been established yet.

skhilliard commented 1 month ago

@JacksonWeber I see....is my assumption correct that the applicationinsights-native-metrics package is not supported with 3.x? Using that package gives us these metrics...

image

JacksonWeber commented 1 month ago

@skhilliard Apologies, missed that question, that's correct, the no longer supported properties are documented in this table https://github.com/microsoft/ApplicationInsights-node.js?tab=readme-ov-file#applicationinsights-3x-sdk-unsupported-properties.

skhilliard commented 1 month ago

@JacksonWeber Thanks for confirmation....will there be any alternatives for 3.x to gather these?

JacksonWeber commented 1 month ago

@skhilliard There may be in the future, but for now, if you rely on these native metrics, I'd suggest continuing on the 2.X SDK.