dileepanipun / dileepanipun/WeththerSystem
Setup Airbrake for your Java application
- Dominant language
- Java
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Step 1: Install
#### Install option 1: Maven
Add the javabrake dependency through your IDE or directly to your `pom.xml` file:
```xml
io.airbrake
javabrake
0.1.6
```
#### Install option 2: Gradle
Add javabrake to your Gradle dependencies:
```
compile 'io.airbrake:javabrake:0.1.6'
```
#### Install option 3: Ivy
Add javabrake to your Ivy dependencies:
```xml
```
### Step 2: Configure
Import the javabrake library and copy the three configuration lines into your
app to send all uncaught exceptions to Airbrake:
(You can find your project API KEY with your [project's settings](https://airbrake.io/projects/226828/edit))
```java
// Import the library:
import io.airbrake.javabrake.Notifier;
public class ExampleApp {
public static void main(String[] args) {
// Copy configuration lines:
int projectId = ;
String projectKey = "";
Notifier notifier = new Notifier(projectId, projectKey);
}
}
```
Example of reporting a caught exception:
```java
try {
int i = 1/0;
} catch (ArithmeticException e) {
notifier.report(e);
}
```
Visit our official GitHub repo for advanced information and integrations like log4j, log4j2, and logback.
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository file or test is identified. Locate the Java application's build configuration and entry point, then compare the Maven, Gradle, or Ivy dependency options with the project's setup. Confirm completion by configuring the Airbrake project credentials and verifying that an uncaught or caught exception is reported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100