bugsnag

作者: 沉默羔羊121 | 来源:发表于2020-07-13 18:01 被阅读0次

https://docs.bugsnag.com/platforms/java/spring/

Welcome

Create Project

Invite Collaborators

Integrate Bugsnag

Add Bugsnag to your application

Gradle

Maven

Installation

Add Bugsnag as a dependency in your pom.xml:

<dependency>
  <groupId>com.bugsnag</groupId>
  <version>[3.0,4.0)</version>
  <artifactId>bugsnag-spring</artifactId>
</dependency>

Install the library:

mvn install

The simplest way to start capturing exceptions is to create a new class which exposes Bugsnag as a Spring Bean, and imports the BugsnagSpringConfiguration class:

@Configuration
@Import(BugsnagSpringConfiguration.class)
public class BugsnagConfig {
    @Bean
    public Bugsnag bugsnag() {
        return new Bugsnag("bedc34b873dd9735c79b655cf9c32018");
    }
}

Alternatively, you can configure a Bugsnag Bean via XML:

<context:annotation-config />

<bean id="bugsnag" class="com.bugsnag.Bugsnag">
  <constructor-arg name="apiKey" value="bedc34b873dd9735c79b655cf9c32018"/>
</bean>

<bean id="bugsnagSpringConfiguration" class="com.bugsnag.BugsnagSpringConfiguration" />

Test your integration

To verify that your integration is working, call Bugsnag.notify in your application:

bugsnag.notify(new RuntimeException("Test error"));

An error should appear in your dashboard after you click the continue button below.

Next steps

After completing the installation instructions, take a look at our documentation for additional configuration options. Find out how you can track your application's stability, add custom metadata, leave your own breadcrumbs, and more. If you need any help, contact us.

>Take me to the docs

Continue

<iframe frameborder="0" allowtransparency="true" scrolling="no" name="__privateStripeController1" allowpaymentrequest="true" src="https://js.stripe.com/v3/controller-2adbd669afe5a3fca9640f196c9614ac.html#apiKey=pk_0IrCulW48zrQ8jfGmTxj2RHnUPBaM&stripeJsId=c35b611b-7dba-42f4-9349-2ed89523fea9&startTime=2870.324999999866&origin=https%3A%2F%2Fapp.bugsnag.com&referrer=https%3A%2F%2Fapp.bugsnag.com%2Faccounts%2Fbowen-technology%2Fwelcome&controllerId=__privateStripeController1" aria-hidden="true" tabindex="-1" style="box-sizing: border-box; outline: 0px; color: rgb(0, 0, 0); font-family: kievit, serif, avenir, "lucida grande", "gill sans", "helvetica neue", helvetica, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; border: none !important; margin: 0px !important; padding: 0px !important; width: 1px !important; min-width: 100%; overflow: hidden !important; display: block !important; visibility: hidden !important; position: fixed !important; height: 1px !important; pointer-events: none !important; user-select: none !important;"></iframe><iframe data-product="web_widget" title="No content" tabindex="-1" aria-hidden="true" src="about:blank" style="box-sizing: border-box; outline: 0px; color: rgb(0, 0, 0); font-family: kievit, serif, avenir, "lucida grande", "gill sans", "helvetica neue", helvetica, sans-serif; font-size: 13px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; width: 0px; height: 0px; border: 0px; position: absolute; top: -9999px;"></iframe>

相关文章

网友评论

      本文标题:bugsnag

      本文链接:https://www.haomeiwen.com/subject/vtrzcktx.html