Skip to content
This repository was archived by the owner on Jan 8, 2019. It is now read-only.

Conversation

@bengourley
Copy link
Contributor

@bengourley bengourley commented May 2, 2018

image

click: function () {
this.clicks += 1
if (this.clicks === 10) {
bugsnagClient(new Error('user clicked button too many times!'), { severity: 'info' })
Copy link
Contributor

Choose a reason for hiding this comment

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

bugsnagClient.notify

@tremlab
Copy link
Contributor

tremlab commented May 5, 2018

app works perfectly, except for one 'notify()' missing in HelloWorld.vue

I'd be happy to add some more complex config details, metadata & comments -- but that's all extra. Easy install, all errors reported as expected.

are left, how errors are grouped and how they relate to the original source.

To get set up, follow the instructions below. Don't forget to replace the placeholder
API token with your own!

Choose a reason for hiding this comment

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

Where does a user get their own API key?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is a link in the paragraphs above to create a new user. For existing users, there isn't a predictable link to get the api key because the url path contains the project slug. I guess we could be verbose here and give instructions, but I think that might be overkill?

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="shortcut icon" href="<%= webpackConfig.output.publicPath %>favicon.ico">

Choose a reason for hiding this comment

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

What does this do? If this is common knowledge for JS devs then this is fine as is

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is part of the output generated by vue-cli. Looks like it links to the static output dir to look for the favicon rather than the default path. I think it's fine to leave as-is – this is meant to be a project with more complexity and this is indicative of the kinds of things that will be going on in a bigger project.

Choose a reason for hiding this comment

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

Sounds good to me.

@@ -0,0 +1,63 @@
<template>
<div class="hello">
<p>This example shows how to initialize the <code>bugsnagClient</code> once and import<br/>it invarious parts of your application to report your own errors to Bugsnag.</p>

Choose a reason for hiding this comment

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

invarious -> into various

}
}
}
}

Choose a reason for hiding this comment

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

Might be nice to add a couple of short inline comments to explain what Bugsnag is capturing here

Copy link
Contributor Author

@bengourley bengourley May 8, 2018

Choose a reason for hiding this comment

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

What would you suggest? I think the part that says…

<p>Example: we want to know if a user ends up clicking this button more than 10 times.</p>

…explains the high level intention and…

bugsnagClient.notify(new Error('user clicked button too many times!'), { severity: 'info' })

…seems self explanatory:

  • notify bugsnag
  • with the error explaining "too many clicks"
  • and the severity is "info"

Copy link

@fractalwrench fractalwrench May 8, 2018

Choose a reason for hiding this comment

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

Maybe something very simple like:

// sends a handled Error to bugsnag
bugsnagClient.notify(e)

I don't think this is essential so it's up to you

Copy link

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

Left a few nits as inline comments, but I think this is mostly ready to go. Did we have any plans to build the example projects on CI at all?

@bengourley
Copy link
Contributor Author

Thanks for the comments! Updated the critical bits.

Getting this on CI might be something that we want to do – though for it to be of any use we would need to build and run end-to-end tests on it, because it building is not a good indication of whether it will work or not.

@fractalwrench fractalwrench self-requested a review May 8, 2018 10:57
@bengourley bengourley merged commit accebbe into master May 8, 2018
@bengourley bengourley deleted the bundled-example branch May 8, 2018 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants