joshdholtz / Sentry-Android

[Deprecated] Use official "raven-java" library
https://github.com/getsentry/sentry-java
MIT License
180 stars 48 forks source link

Setting release in my app #120

Closed akramShokri closed 7 years ago

akramShokri commented 7 years ago

Hi I need to setRelease in my code because for me release name is not neccessarily app version name. Currently the value which I set in setRelease method is overrided with sentry library. Would you please make this override optional or somehow managable in your future release?

Thanks.

marcomorain commented 7 years ago

Hi @akramShokri thanks for logging this - it's a bug.

To work around this you can use a listener when you initialise Sentry:

Sentry.setCaptureListener(new SentryEventCaptureListener() {
    @Override
    public SentryEventBuilder beforeCapture(SentryEventBuilder builder) {
        return builder.setRelease("my-release-version");
    }
});

I'll work on a fix also.

akramShokri commented 7 years ago

Thanks for the comment and for the fix. I didn't get your comment on email (don't know why :\ ) until today that I checked this issue. Thank you