Class: Sentry::Transport::Configuration
- Inherits:
-
Object
- Object
- Sentry::Transport::Configuration
- Defined in:
- lib/sentry/transport/configuration.rb
Instance Attribute Summary collapse
-
#encoding ⇒ String
The encoding to use to compress the request body.
-
#open_timeout ⇒ Integer
The timeout in seconds to read data from Sentry, in seconds.
-
#proxy ⇒ String, ...
The proxy configuration to use to connect to Sentry.
-
#ssl ⇒ Hash?
The SSL configuration to use to connect to Sentry.
-
#ssl_ca_file ⇒ String?
The path to the CA file to use to verify the SSL connection.
-
#ssl_verification ⇒ Boolean
Whether to verify that the peer certificate is valid in SSL connections.
-
#timeout ⇒ Integer
The timeout in seconds to open a connection to Sentry, in seconds.
-
#transport_class ⇒ Class?
The class to use as a transport to connect to Sentry.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
81 82 83 84 85 86 |
# File 'lib/sentry/transport/configuration.rb', line 81 def initialize @ssl_verification = true @open_timeout = 1 @timeout = 2 @encoding = HTTPTransport::GZIP_ENCODING end |
Instance Attribute Details
#encoding ⇒ String
The encoding to use to compress the request body. Default value is ‘Sentry::HTTPTransport::GZIP_ENCODING`.
72 73 74 |
# File 'lib/sentry/transport/configuration.rb', line 72 def encoding @encoding end |
#open_timeout ⇒ Integer
The timeout in seconds to read data from Sentry, in seconds. Default value is 1.
16 17 18 |
# File 'lib/sentry/transport/configuration.rb', line 16 def open_timeout @open_timeout end |
#proxy ⇒ String, ...
The proxy configuration to use to connect to Sentry. Accepts either a URI formatted string, URI, or a hash with the ‘uri`, `user`, and `password` keys.
If you’re using the default transport (‘Sentry::HTTPTransport`), proxy settings will also automatically be read from tne environment variables (`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`).
41 42 43 |
# File 'lib/sentry/transport/configuration.rb', line 41 def proxy @proxy end |
#ssl ⇒ Hash?
The SSL configuration to use to connect to Sentry. You can either pass a ‘Hash` containing `ca_file` and `verification` keys, or you can set those options directly on the `Sentry::HTTPTransport::Configuration` object:
54 55 56 |
# File 'lib/sentry/transport/configuration.rb', line 54 def ssl @ssl end |
#ssl_ca_file ⇒ String?
The path to the CA file to use to verify the SSL connection. Default value is ‘nil`.
60 61 62 |
# File 'lib/sentry/transport/configuration.rb', line 60 def ssl_ca_file @ssl_ca_file end |
#ssl_verification ⇒ Boolean
Whether to verify that the peer certificate is valid in SSL connections. Default value is ‘true`.
66 67 68 |
# File 'lib/sentry/transport/configuration.rb', line 66 def ssl_verification @ssl_verification end |
#timeout ⇒ Integer
The timeout in seconds to open a connection to Sentry, in seconds. Default value is 2.
10 11 12 |
# File 'lib/sentry/transport/configuration.rb', line 10 def timeout @timeout end |
#transport_class ⇒ Class?
The class to use as a transport to connect to Sentry. If this option not set, it will return ‘nil`, and Sentry will use `Sentry::HTTPTransport` by default.
79 80 81 |
# File 'lib/sentry/transport/configuration.rb', line 79 def transport_class @transport_class end |