Coder Social home page Coder Social logo

javabrake's People

Contributors

dependabot[bot] avatar kyrylo avatar mmcdaris avatar sumitjoshi1989 avatar thompiler avatar vmihailenco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javabrake's Issues

site gives user bad first code

I signed up and started a javabrake project and got code that did not compile as the initial code from the airbrake website.
Screen Shot 2022-03-14 at 1 32 33 PM

Report actual 429 response message

Technically, not all 429 responses from our API will be because of IP rate limiting. If an account runs out of errors or hits a cap, then that would also be a 429 response. Javabrake should report the actual error message or at least not report an incorrect error message. Reporting all 429 responses as IP rate limited is incorrect in some cases.

Remove weird things from Spring Boot example

  1. Delete .vscode
  2. Delete target
  3. Delete ServletInitializer
  4. Use private final for fields, use constructor dependency injection, don't use short names for fields
    @Autowired
    WeatherService svc;

Becomes

private final WeatherService weatherService;

@Autowired
public  WeatherController(WeatherService weatherService)
  1. Don't use digits in method names, for example String weather1(@PathVariable String location)
  2. Don't use the first uppercase letter in the method names, for example GetLocations()
  3. Don't use name in the @Service annotation, if you don't need it
@Service("WeatherService")

becomes

@Service

https://github.com/airbrake/javabrake/tree/master/examples/springboot

[0.2.0] com.google.gson.JsonSyntaxException

I updated Javabrake from 0.1.6 to 0.2.0, changed new Notifier(projectId, projectKey); to new Notifier(config); and ran my application. I got this:

com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
	at com.google.gson.Gson.fromJson(Gson.java:932)
	at com.google.gson.Gson.fromJson(Gson.java:897)
	at com.google.gson.Gson.fromJson(Gson.java:846)
	at com.google.gson.Gson.fromJson(Gson.java:817)
	at io.airbrake.javabrake.PollTask.run(PollTask.java:65)
	at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
	at java.base/java.util.TimerThread.run(Timer.java:506)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
	at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:386)
	at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:215)
	... 7 common frames omitted

Any ideas?

Will version 0.2.3 of javabrake compile under java 8?

Hello,

I just tried upgrading to the latest version of javabrake (0.2.3) and am encountering the error below.
I did some googling and discovered that the problem is because the code was compiled with Java 11, but we are still using Java 8.
Can I obtain a version of Airbrake that was compiled with Java 8?

If not, we could pull your code and compile our own WAR, provided that the code does not depend on Java 11. Do you know the answer to that?

Thanks.

Should not show the full file name in the trace

The old Java notifier showed something like:

/RequestScope.java:289 → org.glassfish.jersey.process.internal.RequestScope.runInScope
/ServerRuntime.java:916 → org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume
/ServerRuntime.java:872 → org.glassfish.jersey.server.ServerRuntime$AsyncResponder.resume
/SourceFile:147 → com.my_company.SomeClass

While with javabrake the stacktrace is like:

/sun.reflect.NativeConstructorAccessorImpl:-2 → newInstance0
/sun.reflect.NativeConstructorAccessorImpl:62 → newInstance
/sun.reflect.DelegatingConstructorAccessorImpl:45 → newInstance
/java.lang.reflect.Constructor:423 → newInstance
/home/user/apache-tomcat/webapps/ROOT/WEB-INF/classes/com/my_company/SomeClass.class:37 → someMethod

I'm not sure I would call this a "security" issue but I think the old way was better.

NPE in Truncator.java

Hi,

I notice this NPE in version 0.1.6 and also noticed that the fix is already in the master branch, my question is, why isn't that released yet? Are there any plans to make a new release with that fix soon?

Thanks!

Replace system out calls with an appropriate logging solution

Replace things like this

        try {
            RemoteConfigJSON json_data = gson.fromJson(response, RemoteConfigJSON.class);
            this.data.merge(json_data);
        } catch(JsonSyntaxException e) {
            System.out.printf("parse error on: %s\n", response);
            System.out.println(e.getMessage());
            e.printStackTrace();
            return;
        }

Proxy

Hallo!

How can I use Javabrake behind a proxy? Is there a way to configure the proxy setting of OkSender.okhttp?

Best regards,
Simon.

How do I set the request url here

In the old library I used to do
`

protected void setRequest(String url, String component) {
    super.setRequest(url, component);
}

@Override
protected void request(Map<String, Object> request) {
    super.request(request);
}

`
How do I do that here?

Wrong initialization of java.util.Timer breaks normal stop of java app

Hi. Inside of io.airbrake.javabrake.RemoteSettings Timer instantiation happens using no-arg constructor. As a result timer uses non daemon threads. Such Timer instances prevent application to stop even if main thread is stopped and such behavior can be dangerous if app restart is expected
So in my opinion
this.timer = new Timer();
Should be replaced by
this.timer = new Timer(true);
in io.airbrake.javabrake.RemoteSettings
Thanks

GSON Illegal Reflective Access

When sending an error to airbrake, I am receiving the following warning (using OpenJDK 14.0.2):

WARNING: An illegal reflective access operation has occurred                                                                                                                    
WARNING: Illegal reflective access by com.google.gson.internal.reflect.UnsafeReflectionAccessor (file:/home/keelerm/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson
/2.8.6/9180733b7df8542621dc12e21e87557e8c99b8cb/gson-2.8.6.jar) to field java.lang.Throwable.detailMessage                                                                      
WARNING: Please consider reporting this to the maintainers of com.google.gson.internal.reflect.UnsafeReflectionAccessor                                                         
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations                                                                           
WARNING: All illegal access operations will be denied in a future release 

Are there any known solutions to this issue?

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.