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

version 3.1.2 fails to use SENTRY_HTTP_PROXY_* variables #1028

Closed
7 of 27 tasks
sbartram opened this issue Nov 4, 2020 · 5 comments · Fixed by #1035
Closed
7 of 27 tasks

version 3.1.2 fails to use SENTRY_HTTP_PROXY_* variables #1028

sbartram opened this issue Nov 4, 2020 · 5 comments · Fixed by #1035
Labels
enhancement New feature or request

Comments

@sbartram
Copy link

sbartram commented Nov 4, 2020

Platform:

  • Android -> If yes, which Device API (and compileSdkVersion/targetSdkVersion/Build tools) version?
  • Java -> If yes, which Java (and sourceCompatibility/targetCompatibility) version? 1.8
  • Kotlin -> If yes, which Kotlin (and jvmTarget) version?
  • NDK -> If yes, which NDK/CMake version?
  • React-Native -> If yes, which version?
  • Timber -> If yes, which version?
  • Log4j2 -> If yes, which version?
  • Logback -> If yes, which version?
  • Spring -> If yes, which version?

IDE:

  • Android Studio -> If yes, which version?
  • IntelliJ -> If yes, which version?
  • Other -> If yes, which one?

Build system:

  • Gradle -> If yes, which version? 6.5
  • Buck -> If yes, which version?
  • Bazel -> If yes, which version?
  • Maven -> If yes, which version?
  • Other -> If yes, which one?

Android Gradle Plugin:

  • Yes -> If yes, which version?
  • No

Sentry Android Gradle Plugin:

  • Yes -> If yes, which version?
  • No

Proguard/R8:

  • Enabled
  • Disabled

Platform installed with:

  • JCenter
  • Bintray
  • Maven Central
  • Manually

The version of the SDK:
3.1.2


I have the following issue:

We were previously using 1.7.30 and specifying our HTTP proxy using these environment variables:

SENTRY_HTTP_PROXY_HOST=host
SENTRY_HTTP_PROXY_PORT=port

This was working fine. After upgrading the 3.1.2, the proxy is not being set on the connection. If I set the proxy manually via hardcode, it works again. The documentation still claims that using the environment variables will work.

Steps to reproduce:

  • upgrade working code from 1.7.30 to 3.1.2

Actual result:

  • HTTP connections to Sentry fail because a proxy is required

Expected result:

  • HTTP connections work
@marandaneto
Copy link
Contributor

dup of #981 I believe.
not all the system envs are available on 3.x, still, you could set the proxy yourself.

pseudocode:

Sentry.init(options => {
  // read your own system envs (host, port)
  Proxy proxy = new Proxy(host, port);
  options.setProxy(proxy);
})

@sbartram
Copy link
Author

sbartram commented Nov 4, 2020

As I stated in the report, if I set the proxy manually, it works. However, Sentry should acknowledge this as a bug or fix the documentation.

dup of #981 I believe.
not all the system envs are available on 3.x, still, you could set the proxy yourself.

pseudocode:

Sentry.init(options => {
  // read your own system envs (host, port)
  Proxy proxy = new Proxy(host, port);
  options.setProxy(proxy);
})

@marandaneto
Copy link
Contributor

oh sorry I misread that, link to the docs are here https://docs.sentry.io/platforms/java/configuration/#using-a-proxy
we should fix the docs.

@marandaneto
Copy link
Contributor

this will be released in the next version, I'll keep it open because we need to work on the docs.

@marandaneto
Copy link
Contributor

@marandaneto marandaneto added enhancement New feature or request and removed documentation labels Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants