Skip to content

Commit 80b7d67

Browse files
authored
Add info about user
1 parent e86c5bf commit 80b7d67

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ errorHandler.start({
6767
key: '<my-api-key>',
6868
projectId: '<my-project-id>',
6969
service: '<my-service>', // (optional)
70-
version: '<my-service-version>' // (optional)
70+
version: '<my-service-version>', // (optional)
7171
// reportUncaughtExceptions: false // (optional) Set to false to stop reporting unhandled exceptions.
7272
// disabled: true // (optional) Set to true to not report errors when calling report(), this can be used when developping locally.
73+
// context: {user: 'user1'} // (optional) You can set the user later using setUser()
7374
});
7475
</script>
7576
```
@@ -80,6 +81,8 @@ Unhandled exception will now automatically be reported to Stackdriver Error Repo
8081

8182
You can also change your application code to report errors: `try { ... } catch(e) { errorHandler.report(e); }` or simply `errorHandler.report('Something broke!');`.
8283

84+
You can set a user identifier at any time using `errorHandler.setUser('userId')`.
85+
8386
### Source maps
8487

8588
Only publicly available JavaScript source maps are supported.

0 commit comments

Comments
 (0)