question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No custom Events or custom Metrics in the App Insights

See original GitHub issue

I have an appropriate environment variable with an instrumentation key in our app. After I run appInsights.setup().start() I can see basic data like amount of requests in App Insights.

Also, we have an angular app serving from this Node app. I included the javascript sdk and can see metrics like page load time in the same dashboard.

But my problem is that custom Events and custom Metrics in Nodejs SDK do not show up in the charts. There are no errors or other feedback, so I don’t know how to make it work.

I have these test lines running to get metrics and I’m pretty sure these lines run many times:

client.trackEvent("registeredLogin", {id: "someid", name: "somename" });
client.trackEvent("registeredLogin2", {test: 123});
client.trackMetric("registeredLogin", 1);

But I can’t find anything in neither the Metrics Explorer nor in the customEvents/customMetrics tables in the Analytics.

In the package.json file I have "applicationinsights": "^0.15.11".

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

1reaction
SergeyKanzhelevcommented, Mar 7, 2017

This line will set it for your own client only: client.config.endpointUrl = "https://dc.services.visualstudio.com/v2/track"; So you need to do it for autocollection client somehow. @KamilSzostak how to do it?

@romangusev I’d suggest to update the SDK version though to the latest one

1reaction
SergeyKanzhelevcommented, Mar 7, 2017

Or set it manually by client.config.endpointUrl = "https://dc.services.visualstudio.com/v2/track";

Read more comments on GitHub >

github_iconTop Results From Across the Web

Application Insights API for custom events and metrics
In Application Insights, a custom event is a data point that you can display in Metrics Explorer as an aggregated count and in...
Read more >
How to Create Custom Events, Metrics, Traces in Azure ...
In the Azure portal, in App Insights go to Events to see the new event. Note this may take some time to appear:...
Read more >
Tracking Application Insights Custom Events - Serverless360
The instrumentation monitors your app and directs the telemetry data to an Azure Application Insights Resource using a unique GUID which we refer...
Read more >
Application Insight Custom Metrics Not available in Logs
There can be couple of minutes or less latency in Application Insights Pipeline itself. · When new custom property or new custom metric...
Read more >
Report metrics to Azure Monitor Application Insights
example graph events. The sample reports the following metrics to App Insights: ... Signals are converted into App Insights custom events.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found