Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion stackdriver-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ StackdriverErrorReporter.prototype.start = function(config) {
this.projectId = config.projectId;
this.targetUrl = config.targetUrl;
this.context = config.context || {};
this.serviceContext = {service: config.service || 'web'};
this.serviceContext = {service: config.service || 'web',
resourceType: config.resourceType || 'reported_errors',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are also adding resourceType in context.
I am supportive, but I recommend sending a different PR for this.

severity: 'ERROR' || config.severity
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you talk more about why you think severity should be stored in the config?

I would expect instead the severity to be provided every time an error is reported.

};
if (config.version) {
this.serviceContext.version = config.version;
}
Expand Down