Open pedro37 opened 9 months ago
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 https://github.com/Azure/azure-sdk-for-js/pull/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 https://github.com/microsoft/ApplicationInsights-node.js/issues/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: https://github.com/microsoft/ApplicationInsights-node.js/issues/1107#issuecomment-1876088622
@hectorhdzg any update on this? We use applicationinsights
for the main-thread of our electron app, but it still outputs eight lines whenever it's started (even in production):
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. []
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. []
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. []
Invalid metric name: "\Memory\Available Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Processor(_Total)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
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. []
Accessing resource attributes before async attributes settled []
Accessing resource attributes before async attributes settled []
I am also getting similar errors on startup....I am following the "upgrade" path...for example....
@azure/opentelemetry-instrumentation-azure-sdk [
'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'
]
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. []
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. []
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. []
Invalid metric name: "\Memory\Available Bytes". The metric name should be a ASCII string with a length no greater than 255 characters. []
Invalid metric name: "\Processor(_Total)\% Processor Time". The metric name should be a ASCII string with a length no greater than 255 characters. []
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. []
Accessing resource attributes before async attributes settled []
The iKey configuration option is not supported by the shim. Please configure the the connection string instead. Please reference the Azure Monitor OpenTelemetry Migration Doc for more information. If this functionality is required, please revert to Application Insights 2.X SDK. []
...additionally, I am not sure why I am getting this error...
The iKey configuration option is not supported by the shim. Please configure the the connection string instead. Please reference the Azure Monitor OpenTelemetry Migration Doc for more information. If this functionality is required, please revert to Application Insights 2.X SDK. []
I am initializing it this way...
import * as appinsights from 'applicationinsights';
if (!!process.env.APPINSIGHTS_INSTRUMENTATIONKEY) {
appinsights
.setup(process.env.APPINSIGHTS_INSTRUMENTATIONKEY)
.setDistributedTracingMode(appinsights.DistributedTracingModes.AI_AND_W3C)
.start();
appinsights.defaultClient.config.enableLoggerErrorToTrace = true;
}
The value of process.env.APPINSIGHTS_INSTRUMENTATIONKEY
is actually of the form InstrumentationKey=xxxxx
Also one other question (I can create a separate item for this if needed)....am I still allowed to track custom metrics and events thusly?
appinsights.defaultClient.trackMetric({ name: 'Redis Health Check', value: 1 });
appinsights.defaultClient.trackEvent({
name: UserChallengeEvent.loginAttemptAccountLocked,
properties: {
userId: user._id
}
});
@pedro37 @sebastianvitterso The invalid metric name warnings are resolved as of 3.1.0. The last two warnings (regarding the @azure/core-tracing package and Accessing resource attributes before async attributes settled) we are aware of and working to resolve. I can update this thread once they are.
I am using version 3.1.0 and still have warnings.
I add config as per README and get duplicate errors in the config am I missing something?