Skip to content

Commit

Permalink
Ability to chamge user, session and device info.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirRybalko committed May 25, 2017
1 parent 4f97cf4 commit 244a003
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 22 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ Sends a custom event to Application Insights.
Sends error data to Application Insights.
```Javascript
// exception (Error) : Required - the error object to be processed.
// properties (Hash): Optional - a String/String hash object of properties to associate with this exception

applicationInsightsService.trackException( exception );
applicationInsightsService.trackException(exception, properties);
```
Note: if the *autoTrackExceptions* option is enabled, this method will be called any time the **$exceptionHandler** is invoked.
```Javascript
Expand Down Expand Up @@ -169,15 +170,35 @@ Sends a trace log message to Application Insights.
// severity (String) : Optional - The message severity Level (debug,info,warn, error). Defaults to 'info'.
// properties (Hash) : Optional - a String/String hash object of properties to associate with this event.

applicationInsightsService.trackTraceMessage( message , severity , properties);
applicationInsightsService.trackTraceMessage( message, severity, properties);
```
If the *autoLogTracking* option is enabled, trackTraceMessage will be called any time one of the **$log** service methods are called.
```Javascript
// trackTraceMessage will be invoked with a value of 'message' and 'info' as the parameters.
$log.info('message');
```

#### defineUser
Define a new user metadata.
```Javascript
// userId (Guid) : Required - The user unique identifier.
applicationInsightsService.defineUser( userId );
```

#### defineSession
Define a new session identifier of Application Insights.
```Javascript
// sessionId (Guid) : Required - The session identifier.
applicationInsightsService.defineSession( sessionId );
```

#### defineDevice
Define a new device metadata.
```Javascript
// id (Guid) : Required - The device unique identifier.
// type (String) : Required - The device type.
applicationInsightsService.defineDevice( id, type );
```

[travisCI-image]: https://travis-ci.org/khaines/angular-applicationinsights.svg?branch=master&
[travisCI-url]: https://travis-ci.org/khaines/angular-applicationinsights
Expand Down
43 changes: 33 additions & 10 deletions dist/angular-applicationinsights.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 244a003

Please sign in to comment.