You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when the application go offline i want to get an alert or i can know from azure Monitoring dashboard.
also i can't finish any reference to use TrackRequest ?
The text was updated successfully, but these errors were encountered:
My understanding from using ApplicationInsights is that Requests are typically for the server-side logging of requests made to an API. Typically all the interactions from the client-side (i.e. the Angular SPA), are through PageViews, Events, etc.
For your use-case, I would consider using TrackEvent instead.
// app-insight.service.ts (this package)
// https://github.com/Microsoft/ApplicationInsights-JS/blob/master/API-reference.md#trackevent
/**
* Log a user action or other occurrence.
* @param name A string to identify this event in the portal.
* @param properties map[string, string] - additional data used to filter events and metrics in the portal. Defaults to empty.
* @param measurements map[string, number] - metrics associated with this event, displayed in Metrics Explorer on the portal. Defaults to empty.
*/
trackEvent(eventName: string, eventProperties?: { [name: string]: string }, metricProperty?: { [name: string]: number }) {
try {
AppInsights.trackEvent(eventName, eventProperties, metricProperty);
} catch (ex) {
console.warn('Angular application insights Error [trackEvent]: ', ex);
}
}
You could then construct an Azure Logs query that would figure out the frequency that your application is losing internet connection and display a graph. For example:
when the application go offline i want to get an alert or i can know from azure Monitoring dashboard.
also i can't finish any reference to use TrackRequest ?
The text was updated successfully, but these errors were encountered: