Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation for api 1.0.0-beta-1 #72

Closed
helderribeirosousa opened this issue Oct 27, 2017 · 5 comments
Closed

Documentation for api 1.0.0-beta-1 #72

helderribeirosousa opened this issue Oct 27, 2017 · 5 comments
Assignees

Comments

@helderribeirosousa
Copy link

helderribeirosousa commented Oct 27, 2017

I've seen you've added my previous issue (#67) to the changelog for the 1.0.0-beta-1 version. Thank you.
Now i've updated to that version but now NONE of my issues are being sent to rollbar!

I mean... Where's the javadoc for the 1.0.0-beta-1 version?
I'm using this code...

`public static final Rollbar rollbar = new Rollbar(withAccessToken("ACCESS_TOKEN").environment("production").build());

Map<String,Object> custom = new HashMap<>();
custom.put("fingerprint",code);
custom.put("message",message);

rollbar.critical(myThrowable,custom);`

This is supposed to send the payload to rollbar right?
Seriously guys... I need to have this on components that are being used in production ASAP.
And let's pretend that i'm not actually having to resort to a beta build in such environments in the first place.

@rokob
Copy link
Contributor

rokob commented Oct 27, 2017

  1. There was an issue uploading the javadocs, I am going to publish 1.0.0-beta-2 with the javadocs right now.
  2. When you say NONE of your issues are being sent to rollbar, what exactly is happening? The code snippet you provided is compiling, running without throwing an exception, but nothing is showing up in the UI? Or some other scenario?

The code snippet you put there should indeed send the payload to rollbar.

@helderribeirosousa
Copy link
Author

Ok. I finally had some time to test all my components with the 1.0.0-beta-1. I have three of them and two of them are working fine. The one that is not working is actually the one that caused me to open issue #67.

Here's how i'm initializing rollbar and submiting an error:
https://pastebin.com/NPz1SdD4

Here's a stacktrace that is not being sent:
https://pastebin.com/b7nqEfey

Maybe you should throw an Exception whenever an error could not be sent to rollbar.
That way i could catch it and know it wasn't sent. I could also see in which part of your code the exception was thrown.

@basoko
Copy link
Contributor

basoko commented Oct 31, 2017

I think you could monitor it attaching an event listener to the Sender. I leave a piece of code to show you how you could do it.

 Sender sender = new SyncSender.Builder().build();
    sender.addListener(new SenderListener() {
      @Override
      public void onResponse(Payload payload, Response response) {
        System.out.println("Response: " + response);
      }

      @Override
      public void onError(Payload payload, Exception e) {
        System.out.println("Error: " + e);
      }
    });

    Rollbar rollbar = new Rollbar(withAccessToken("ACCESS_TOKEN").environment("production").sender(sender).build());

@helderribeirosousa
Copy link
Author

helderribeirosousa commented Oct 31, 2017

Here it is!

Error: com.rollbar.notifier.sender.exception.SenderException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Thanks to this i was able to figure out what was causing the issue. I've replaced java's trustStore by a local store file and that was causing an ssl handshake error (couldn't validate your certificate's chain).
I've removed the code that was pointing to my local file and added those keys to Java's default keystore ("$(JDK_INSTALL)/jre/lib/security/cacerts") using Java's keytool.
Now everything is fine.

I really think you should throw an exception whenever a payload isn't sent.

Anyway, thank you very much for your help on finding the issue.

@brianr
Copy link
Member

brianr commented Oct 31, 2017

@helderribeirosousa glad you were able to fix the problem, and thanks for following up!

I've filed #76 to track changes related to making this kind of thing easier to find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants