trackEvent API Reference Wrong?
See original GitHub issueDescription/Screenshot
When I call: appInsights.trackEvent({ name: 'mike d event name test' });
it produces ‘[object Object]’ for an Event name
:
But according to Sending Telemetry to the Azure Portal in the readme I should be using: appInsights.trackEvent({name: 'some event'});
Also, the API reference for trackEvent says it takes in an ITelemetryEvent
which is defined as:
export interface IEventTelemetry extends IPartC {
/**
* @description An event name string
* @type {string}
* @memberof IEventTelemetry
*/
name: string;
}
When I search through the code I see tests that are passing strings not objects:
Steps to Reproduce
- OS/Browser:
- SDK Version: Microsoft.ApplicationInsights.AspNetCore (2.8.1) via NuGet
- How you initialized the SDK: I didn’t directly, I just add app insights to my ASP.NET Core project via Visual Studio and it wired up the magic. Looks like it added
@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
to my _'Layout.cshtml’ file.
Expected behavior
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TrackEvent - Web APIs | MDN
Creates and initializes a new TrackEvent object with the event type specified, as well as optional additional properties. Instance properties.
Read more >Application Insights API for custom events and metrics
Pages, screens, panes, or forms. TrackEvent, User actions and other events. Used to track user behavior or to monitor performance. GetMetric, Zero and ......
Read more >Not tracking events - Support & Bugs - Matomo forums
I'm testing my site from a localhost frontend. Page visits and search queries shows up in the reports, but my trackEvent calls doesn't...
Read more >Events API - Zendesk Developer Docs
In addition to this API reference, the following resources are available in the Develop ... source, string, false, true, Application which sent the...
Read more >post - Sendinblue Tracker
post https://in-automate.sendinblue.com/api/v2/trackEvent. The Track Event endpoint lets you capture events on your website, along with optional extra ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @spottedmahn. We’re going to be releasing an update to AspNetCore probably next week (2.12-Beta2) with the stable release coming in December.
Actually that nuget package may be updated with the latest JS SDK soon. This PR was just merged to move it to the latest https://github.com/microsoft/ApplicationInsights-dotnet/pull/1276#event-2758134114
/cc @timothyMothra can provide a rough ETA