Skip to content

Commit

Permalink
Update README.md (#2268)
Browse files Browse the repository at this point in the history
  • Loading branch information
siyuniu-ms authored Feb 9, 2024
1 parent 6365dad commit d88307e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,28 @@ appInsights.trackEvent({
});
```
```js
appInsights.startTrackEvent("event name");
appInsights.stopTrackEvent("event name", {
prop1: 3.14,
prop2: 'string',
prop3: {nested:"objects are okay too"}
}
)
```
If you wish to organize customer properties into separate sections based on properties and measurements for better visualization on the Azure Portal, consider using the following code:
```js
appInsights.startTrackEvent("event name");
appInsights.stopTrackEvent("event name", {
stringProp1: 'string',
stringProp2: {nested:"objects are okay too"}
},
{numProp1: 3.15, numProp2: 90000}
)
```
### Setting Up Autocollection
All autocollection is ON by default. The full version of the Application Insights Javascript SDK auto collects:
Expand Down

0 comments on commit d88307e

Please sign in to comment.