microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate/Invalid metric errors when starting useAzureMonitor

pedro37 opened this issue · comments

I add config as per README and get duplicate errors in the config am I missing something?

import { useAzureMonitor } from 'applicationinsights';
const config= {
      azureMonitorExporterOptions: {
        connectionString: myConnectionString,
      },
      samplingRatio: 1,
      enableAutoCollectExceptions: true,
      enableAutoCollectStandardMetrics: true,
      enableAutoCollectPerformance: true,
      instrumentationOptions: {
        azureSdk: { enabled: true },
        http: { enabled: true },
        redis: { enabled: true }
      },
      logInstrumentationOptions: {
        bunyan: { enabled: true},
        winston: { enabled: true},
      },
      extendedMetrics: {
        gc: true,
        heap: true,
        loop: true
      }
    };
    useAzureMonitor(config);`


ApplicationInsights:Invalid metric name: "Request Duration". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\Memory\Available Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\ASP.NET Applications(??APP_W3SVC_PROC??)\Requests/Sec". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Success Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Retry Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\ASP.NET Applications(??APP_W3SVC_PROC??)\Request Execution Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
'Module @azure/core-tracing has been loaded before @azure/opentelemetry-instrumentation-azure-sdk so it might not work, please initialize it before requiring @azure/core-tracing'
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\ASP.NET Applications(??APP_W3SVC_PROC??)\Request Execution Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
'Module @azure/core-tracing has been loaded before @azure/opentelemetry-instrumentation-azure-sdk so it might not work, please initialize it before requiring @azure/core-tracing'
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Duration". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\Processor(_Total)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\Process(??APP_WIN32_PROC??)\Private Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Success Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Duration". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Retry Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Success Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Retry Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Throttle Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Retry Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Duration". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Success Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Exception Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Duration". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "\Process(??APP_WIN32_PROC??)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Success Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:@azure/opentelemetry-instrumentation-azure-sdk [
ApplicationInsights:Invalid metric name: "Request Failure Count". The metric name should be a ASCII string with a length no greater than 255 characters. []
ApplicationInsights:Invalid metric name: "Retry Count". The metric name should be a ASCII string with a length no greater than 255 characters. []

We are aware of this warnings, but these should not cause any change of behavior in the SDK, we fixed that in Azure Monitor OpenTelemetry Exporter recently and should be published soon.

Related to
Azure/azure-sdk-for-js#27179

Other issue related to Azure Instrumentation is also not causing problems but we are working on trying to avoid the unnecessary noise.
Related to
#1107

Thanks, I have another issue I have set a startActiveSpan but it is not showing in the appinsights metrics.

@pedro37 can you elaborate on your issue? what kind of metrics are you expecting to see?

Yes, I have essentially the following code snippet and I am expecting span-name to appear in the application insights metric dropdown, using the config above

startActiveSpan('span-name', (span) => {
  doSomething();
  span.end();
});

We are aware of this warnings, but these should not cause any change of behavior in the SDK, we fixed that in Azure Monitor OpenTelemetry Exporter recently and should be published soon.

Related to Azure/azure-sdk-for-js#27179

Other issue related to Azure Instrumentation is also not causing problems but we are working on trying to avoid the unnecessary noise. Related to #1107

These are not simply warnings. These output to the terminal when run, so it is not currently possible to use the Azure Monitor OpenTelemetry solution in a CLI, since every execution displays this (incredibly odd) "warning" to the users and the CLI developers do not have the ability to control this behavior: #1107 (comment)