diff --git a/src/platforms/ruby/common/configuration/options.mdx b/src/platforms/ruby/common/configuration/options.mdx index f1f2e2b9bcfbd..55ba2cc7ed36d 100644 --- a/src/platforms/ruby/common/configuration/options.mdx +++ b/src/platforms/ruby/common/configuration/options.mdx @@ -251,6 +251,30 @@ config.trusted_proxies = ["2.2.2.2"] config.transport.transport_class = MyTransportClass ``` +`proxy` + +: Setup a proxy to use to connect to Sentry. This option is respected by the default `Sentry::HTTPTransport` class. You can set `config.transport.proxy` with as a `String` containing a proxy URI, or a `URI` object, or a `Hash` containing `uri`, `user` and `password` keys. + +```ruby +Sentry.init do |config| + # ... + + # Provide proxy config as a String + config.transport.proxy = "http://user:password@proxyhost.net:8080" + + # Or a URI + config.transport.proxy = URI("http://user:password@proxyhost.net:8080") + + # Or a Hash + config.transport.proxy = { + uri: "http://proxyhost.net:8080", + user: "user", + password: "password" + } +end + +``` + ## Environment Variables `SENTRY_DSN`