Coder Social home page Coder Social logo

exceptionless.java's Introduction

Exceptionless.Java

The definition of the word exceptionless is: to be without exception. Exceptionless provides real-time error reporting for your Java apps. It organizes the gathered information into simple actionable data that will help your app become exceptionless!

Using Exceptionless

Refer to the Exceptionless documentation here: Exceptionless Docs.

This project is available to install through Maven.

<!-- https://mvnrepository.com/artifact/com.exceptionless/exceptionless-client -->
<dependency>
    <groupId>com.exceptionless</groupId>
    <artifactId>exceptionless-client</artifactId>
    <version>0.1.0</version>
</dependency>

Check the latest version of the library here

Show me the code

class ExampleApp {
    public static void main(String[] args) {
        private static final ExceptionlessClient client =
                ExceptionlessClient.from(
                        System.getenv("EXCEPTIONLESS_SAMPLE_APP_API_KEY"),
                        System.getenv("EXCEPTIONLESS_SAMPLE_APP_SERVER_URL"));

        // Submit different events using submitXXX methods
        client.submitLog("Test log");

        // Submit custom methods using our createXXX methods
        client.submitEvent(
                EventPluginContext.from(
                        client.createLog("test-log").referenceId("test-reference-id").build()));

        // Submit async events using submitXXXAsync methods
        client.submitLogAsync("Test log");
    }
}

Builder Pattern

We love our builders!!! This project heavily utilized the use of builders instead of traditional object creation using new. We do this with the help of Project Lombok's @Builder annotation. Read more about the project here. Read more about the annotation here. Read more about the builder pattern here.

Example: Customizing your Event Queue implementation

EventQueueIF queue = //get your implementation
Configuration configuration = Configuration.builder()
        .serverUrl("http://your-server-url")
        .apiKey("your-api-key")
        .queue(queue)
        .build();
ExceptionlessClient client = ExceptionlessClient.builder().configuration(configuration).build();

In this library we have made sure that all the values which are not set by builders fallback to reasonable defaults. So don't feel the pressure to supply values for all the fields. Note: Whenever customizing the client using Configuration never forget to supply your serverUrl and apiKey using a Configuration object as shown above.

Getting Started (Development)

Intellij

  1. You will need to install:
  2. Clone the repo
  3. Verify your setup using mvn clean verify

VSCode

  1. You will need to install:
  2. Clone the repo
  3. Verify your setup using mvn clean verify

Spring Boot Users

You can observe NoClassDefFoundError in your Spring-boot apps because Spring-boot uses v3 of OkHttpClient while this client uses v4. In that case you have to explicitly declare v4 of the library in you pom.xml/build.gradle.

<dependencies>
    <dependency>
        <groupId>com.exceptionless</groupId>
        <artifactId>exceptionless-client</artifactId>
        <version>1.0-beta1</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <!-- EXPLICIT DECLARATION -->
    <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <version>4.9.1</version>
    </dependency>
</dependencies>

VSCode Users

We are using Project Lombok to automatically generate a lot of code. Intellij can give you IntelliSense by default but for VSCode you may have to install this extension.

General Data Protection Regulation

By default the Exceptionless Client will report all available metadata including potential PII data. You can fine tune the collection of information via Data Exclusions or turning off collection completely.

Please visit the docs for detailed information on how to configure the client to meet your requirements.

Support

If you need help, please contact us via in-app support, open an issue or join our chat on Discord. We’re always here to help if you have any questions!

Thanks

Thanks to all the people who have contributed!

contributors

exceptionless.java's People

Contributors

pc9795 avatar niemyjski avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.