-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Sentry external config not loading sentry.properties from disk automatically #1046
Comments
thanks for raising this. I think it tries to read by default from the ClassLoader, cc @maciejwalkowiak to confirm. |
As @marandaneto said, by default it tries to load a file from the root of the classpath. Now I see that in 1.7.x in addition to that it did look into the root directory. I'll prepare a fix for that. |
not sure if it's documented already, but it'd be nice to document which configuration has precedence over others eg file from classpath, then file in the root, system envs, etc... otherwise, they will overwrite each other and it'll be hard to find out. |
It is in Javadocs: https://getsentry.github.io/sentry-java/io/sentry/config/PropertiesProviderFactory.html#create-- but not in the reference docs. I'll add there too. |
yeah worth adding it, this question also came thru different channels, thanks. |
Gonna be released on the next version :) |
Platform:
openjdk version "11.0.2" 2019-01-15
IDE:
IntelliJ IDEA 2020.2.3 (Ultimate Edition)
Build system:
6.7
Android Gradle Plugin:
Sentry Android Gradle Plugin:
Proguard/R8:
Platform installed with:
The version of the SDK:
3.1.3
I have the following issue:
Sentry does not load
sentry.properties
from disk by default if the file is in the root directory with the application.Adding the system property to tell sentry where the file is located is required to load the properties file.
Steps to reproduce:
Place properties file in working directory with application when using external configuration.
Actual result:
File is not loaded and no dsn is available.
Expected result:
Works as before with version 1 and auto detects the file.
The text was updated successfully, but these errors were encountered: