Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting info and debug logs other than Errors #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

indrajeet0510
Copy link

Adding custom resourceType and severity

Adding custom resourceType and severity
@google-cla
Copy link

google-cla bot commented Apr 21, 2021

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no This human has *not* signed the Contributor License Agreement. label Apr 21, 2021
@google-cla google-cla bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Apr 21, 2021
this.serviceContext = {service: config.service || 'web'};
this.serviceContext = {service: config.service || 'web',
resourceType: config.resourceType || 'reported_errors',
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.

@@ -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.

@Minishlink
Copy link
Contributor

@steren I don't see anything on the Cloud Reporting API documentation about the severity field. How would the console show this log if set to something else to ERROR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants