microsoft / ApplicationInsights-node.js

Microsoft Application Insights SDK for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid metric name: The metric name should be a ASCII string with a length no greater than 255 characters.

JCBauza opened this issue · comments

commented

I get the following error message:

Invalid metric name: "Global Pongs (snapshot)". The metric name should be a ASCII string with a length no greater than 255 characters. []

However, I believe the string contains only ASCII characters. Tried removing the () and still the same:

Invalid metric name: "Global Pongs Snapshot". The metric name should be a ASCII string with a length no greater than 255 characters. []

This happens when I track a Metric with the following code:
appInsights.defaultClient.insightsClient().trackMetric({ name: "Global Pongs Snapshot", value: snapshot.length });

Any ideas what could be the issue?

@JCBauza You should be able to resolve this issue by removing any spaces in your metric name. Possibly something like "Global_Pongs_Snapshot". Please let me know if that change works for you. Thanks!

commented

Thanks, it worked!