class Raven::Configuration
- Raven::Configuration
- Reference
- Object
Defined in:
raven/configuration.crConstant Summary
-
DEFAULT_PROCESSORS =
[Processor::RemoveCircularReferences, Processor::Cookies, Processor::RequestMethodData, Processor::HTTPHeaders, Processor::UTF8Conversion, Processor::SanitizeData, Processor::Compact] of Processor.class
-
Note the order - we have to remove circular references and bad characters before passing to other processors.
-
DEFAULT_REQUEST_METHODS_FOR_DATA_SANITIZATION =
["POST", "PUT", "PATCH"] of ::String
-
Array of default request methods for which data should be removed.
-
IGNORE_DEFAULT =
[] of Exception.class | String
-
Array of exception classes that should never be sent.
-
REQUIRED_OPTIONS =
[:host, :public_key, :project_id] of ::Symbol
-
Array of required properties needed to be set, before
Configuration
is considered valid.
Constructors
Instance Method Summary
- #app_dirs_pattern(*args, **options)
- #app_dirs_pattern(*args, **options, &)
- #app_dirs_pattern=(arg)
-
#async : Proc(Event, Nil) | Nil
Provide a
Proc
object that responds tocall
to send events asynchronously, or passtrue
to to use standardspawn
. -
#async=(async : Proc(Event, Nil) | Nil)
Provide a
Proc
object that responds tocall
to send events asynchronously, or passtrue
to to use standardspawn
. -
#async=(switch : Bool)
Sets
#async
callback to eitherFiber
-based implementation (see below), ornil
, depending on the given switch value. - #backtracer : Backtracer::Configuration
- #backtracer=(backtracer : Backtracer::Configuration)
-
#before_send(&block : Event, Event::Hint | Nil -> _)
Optional
Proc
, called before sending an event to the server: -
#before_send : Proc(Event, Event::Hint | Nil, Event | Nil) | Nil
Optional
Proc
, called before sending an event to the server: -
#before_send=(block : Event, Event::Hint | Nil -> _)
Optional
Proc
, called before sending an event to the server: -
#before_send=(before_send : Proc(Event, Event::Hint | Nil, Event | Nil) | Nil)
Optional
Proc
, called before sending an event to the server: - #capture_allowed!(message_or_ex) : ValidationError | Nil
- #capture_allowed! : ValidationError | Nil
- #capture_allowed?(message_or_ex) : Bool
- #capture_allowed? : Bool
-
#connect_timeout : Time::Span
Timeout waiting for the Sentry server connection to open in seconds.
-
#connect_timeout=(connect_timeout : Time::Span)
Timeout waiting for the Sentry server connection to open in seconds.
- #context_lines(*args, **options)
- #context_lines(*args, **options, &)
- #context_lines=(arg)
-
#current_environment : String | Nil
Defaults to
SENTRY_ENVIRONMENT
variable if set,"default"
otherwise. -
#current_environment=(current_environment : String | Nil)
Defaults to
SENTRY_ENVIRONMENT
variable if set,"default"
otherwise. -
#dsn : String | Nil
Simple server string - set this to the DSN found on your Sentry settings.
- #dsn=(uri : URI)
- #dsn=(value : String)
-
#encoding : Encoding
Encoding type for event bodies.
-
#encoding=(encoding : Encoding)
Encoding type for event bodies.
-
#environments : Array(String)
Whitelist of environments that will send notifications to Sentry.
-
#environments=(environments : Array(String))
Whitelist of environments that will send notifications to Sentry.
-
#exclude_loggers : Array(String)
::Log#source
patterns excluded from breadcrumb recording. -
#exclude_loggers=(exclude_loggers : Array(String))
::Log#source
patterns excluded from breadcrumb recording. -
#excluded_exceptions : Array(Exception.class | String)
Array of exception classes that should never be sent.
-
#excluded_exceptions=(excluded_exceptions : Array(Exception.class | String))
Array of exception classes that should never be sent.
-
#host : String | Nil
NOTE DSN component - set automatically if DSN provided.
-
#host=(host : String | Nil)
NOTE DSN component - set automatically if DSN provided.
- #ignored_logger?(source)
- #modules_path_pattern(*args, **options)
- #modules_path_pattern(*args, **options, &)
- #modules_path_pattern=(arg)
-
#path : String | Nil
NOTE DSN component - set automatically if DSN provided.
-
#path=(path : String | Nil)
NOTE DSN component - set automatically if DSN provided.
-
#port : Int32 | Nil
NOTE DSN component - set automatically if DSN provided.
-
#port=(port : Int32 | Nil)
NOTE DSN component - set automatically if DSN provided.
-
#processors : Array(Processor.class)
Processors to run on data before sending upstream.
-
#processors=(processors : Array(Processor.class))
Processors to run on data before sending upstream.
-
#project_id : UInt64 | Nil
Project ID number to send to the Sentry server
-
#project_id=(project_id : UInt64 | Nil)
Project ID number to send to the Sentry server
-
#project_root : String
Project directory root for revision detection.
-
#project_root=(project_root : String)
Project directory root for revision detection.
-
#public_key : String | Nil
Public key for authentication with the Sentry server.
-
#public_key=(public_key : String | Nil)
Public key for authentication with the Sentry server.
-
#random : Random
Random
instance used when#sample_rate
is set. -
#random=(random : Random)
Random
instance used when#sample_rate
is set. -
#read_timeout : Time::Span
Timeout when waiting for the server to return data.
-
#read_timeout=(read_timeout : Time::Span)
Timeout when waiting for the server to return data.
-
#release : String | Nil
Release tag to be passed with every event sent to Sentry.
-
#release=(release : String | Nil)
Release tag to be passed with every event sent to Sentry.
-
#sample_rate : Float64
The sampling factor to apply to events.
-
#sample_rate=(sample_rate : Float64)
The sampling factor to apply to events.
-
#sanitize_credit_cards=(sanitize_credit_cards : Bool)
Should sanitize values that look like credit card numbers?
-
#sanitize_credit_cards? : Bool
Should sanitize values that look like credit card numbers?
-
#sanitize_data_for_request_methods : Array(String)
Request methods for which data should be removed.
-
#sanitize_data_for_request_methods=(sanitize_data_for_request_methods : Array(String))
Request methods for which data should be removed.
-
#sanitize_fields : Array(Regex | String)
By default, Sentry censors
Hash
values when their keys match things like"secret"
,"password"
, etc. -
#sanitize_fields=(sanitize_fields : Array(Regex | String))
By default, Sentry censors
Hash
values when their keys match things like"secret"
,"password"
, etc. -
#sanitize_fields_excluded : Array(Regex | String)
If you're sure you want to override the default sanitization values, you can add to them to an array of
String
s here, e.g. -
#sanitize_fields_excluded=(sanitize_fields_excluded : Array(Regex | String))
If you're sure you want to override the default sanitization values, you can add to them to an array of
String
s here, e.g. -
#sanitize_http_headers : Array(Regex | String)
Sanitize additional HTTP headers - only
Authorization
is removed by default. -
#sanitize_http_headers=(sanitize_http_headers : Array(Regex | String))
Sanitize additional HTTP headers - only
Authorization
is removed by default. -
#scheme : String | Nil
Can be one of
"http"
,"https"
, or"dummy"
. -
#scheme=(scheme : String | Nil)
Can be one of
"http"
,"https"
, or"dummy"
. -
#secret_key : String | Nil
Secret key for authentication with the Sentry server.
-
#secret_key=(secret_key : String | Nil)
Secret key for authentication with the Sentry server.
-
#send_modules=(send_modules : Bool)
Include module versions in reports.
-
#send_modules? : Bool
Include module versions in reports.
-
#server_name : String | Nil
Hostname as an FQDN.
-
#server_name=(server_name : String | Nil)
Hostname as an FQDN.
-
#should_capture : Proc(Exception | String, Bool) | Nil
Provide a configurable
Proc
callback to determine event capture. -
#should_capture=(should_capture : Proc(Exception | String, Bool) | Nil)
Provide a configurable
Proc
callback to determine event capture. -
#silence_ready=(silence_ready : Bool)
Silences ready message when
true
. -
#silence_ready? : Bool
Silences ready message when
true
. - #src_path(*args, **options)
- #src_path(*args, **options, &)
- #src_path=(arg)
-
#ssl : OpenSSL::SSL::Context::Client | Nil
SSL context passed to
Raven::Client
. -
#ssl=(ssl : OpenSSL::SSL::Context::Client | Nil)
SSL context passed to
Raven::Client
. -
#tags : AnyHash::JSON
Default tags for events.
-
#tags=(tags : AnyHash::JSON)
Default tags for events.
-
#tags=(hash : Hash | NamedTuple | Nil)
Default tags for events.
-
#transport_failure_callback : Proc(Event::HashType, Nil) | Nil
Optional
Proc
, called when the Sentry server cannot be contacted for any reason. -
#transport_failure_callback=(transport_failure_callback : Proc(Event::HashType, Nil) | Nil)
Optional
Proc
, called when the Sentry server cannot be contacted for any reason. - #valid? : Bool
- #validate! : ValidationError | Nil
Constructor Detail
Instance Method Detail
Provide a Proc
object that responds to call
to send
events asynchronously, or pass true
to to use standard spawn
.
->(event : Raven::Event) { spawn { Raven.send_event(event) } }
Provide a Proc
object that responds to call
to send
events asynchronously, or pass true
to to use standard spawn
.
->(event : Raven::Event) { spawn { Raven.send_event(event) } }
Sets #async
callback to either Fiber
-based implementation (see below),
or nil
, depending on the given switch value.
->(event : Event) { spawn { Raven.send_event(event) } }
Optional Proc
, called before sending an event to the server:
->(event : Raven::Event, hint : Raven::Event::Hint?) {
if hint.try(&.exception).try(&.message) =~ /database unavailable/i
event.fingerprint << "database-unavailable"
end
event
}
Optional Proc
, called before sending an event to the server:
->(event : Raven::Event, hint : Raven::Event::Hint?) {
if hint.try(&.exception).try(&.message) =~ /database unavailable/i
event.fingerprint << "database-unavailable"
end
event
}
Optional Proc
, called before sending an event to the server:
->(event : Raven::Event, hint : Raven::Event::Hint?) {
if hint.try(&.exception).try(&.message) =~ /database unavailable/i
event.fingerprint << "database-unavailable"
end
event
}
Optional Proc
, called before sending an event to the server:
->(event : Raven::Event, hint : Raven::Event::Hint?) {
if hint.try(&.exception).try(&.message) =~ /database unavailable/i
event.fingerprint << "database-unavailable"
end
event
}
Timeout waiting for the Sentry server connection to open in seconds.
Timeout waiting for the Sentry server connection to open in seconds.
Defaults to SENTRY_ENVIRONMENT
variable if set,
"default"
otherwise.
Defaults to SENTRY_ENVIRONMENT
variable if set,
"default"
otherwise.
Whitelist of environments that will send notifications to Sentry.
Whitelist of environments that will send notifications to Sentry.
::Log#source
patterns excluded from breadcrumb recording.
Defaults to raven.*
.
NOTE You should probably append to this rather than overwrite it.
::Log#source
patterns excluded from breadcrumb recording.
Defaults to raven.*
.
NOTE You should probably append to this rather than overwrite it.
Array of exception classes that should never be sent.
See IGNORE_DEFAULT
.
NOTE You should probably append to this rather than overwrite it.
Array of exception classes that should never be sent.
See IGNORE_DEFAULT
.
NOTE You should probably append to this rather than overwrite it.
Processors to run on data before sending upstream. See DEFAULT_PROCESSORS
.
You should probably append to this rather than overwrite it.
Processors to run on data before sending upstream. See DEFAULT_PROCESSORS
.
You should probably append to this rather than overwrite it.
Project ID number to send to the Sentry server
NOTE If you provide a DSN, this will be set automatically.
Project ID number to send to the Sentry server
NOTE If you provide a DSN, this will be set automatically.
Project directory root for revision detection. Could be Kemal root, etc.
Project directory root for revision detection. Could be Kemal root, etc.
Public key for authentication with the Sentry server.
NOTE If you provide a DSN, this will be set automatically.
Public key for authentication with the Sentry server.
NOTE If you provide a DSN, this will be set automatically.
Release tag to be passed with every event sent to Sentry. We automatically try to set this to a git SHA or Capistrano release.
Release tag to be passed with every event sent to Sentry. We automatically try to set this to a git SHA or Capistrano release.
The sampling factor to apply to events. A value of 0.0
will not send
any events, and a value of 1.0
will send 100% of events.
The sampling factor to apply to events. A value of 0.0
will not send
any events, and a value of 1.0
will send 100% of events.
Should sanitize values that look like credit card numbers?
Request methods for which data should be removed.
Request methods for which data should be removed.
By default, Sentry censors Hash
values when their keys match things like
"secret"
, "password"
, etc. Provide an Array
of String
s that,
when matched in a hash key, will be censored and not sent to Sentry.
By default, Sentry censors Hash
values when their keys match things like
"secret"
, "password"
, etc. Provide an Array
of String
s that,
when matched in a hash key, will be censored and not sent to Sentry.
If you're sure you want to override the default sanitization values, you can
add to them to an array of String
s here, e.g. %w(authorization password)
.
If you're sure you want to override the default sanitization values, you can
add to them to an array of String
s here, e.g. %w(authorization password)
.
Sanitize additional HTTP headers - only Authorization
is removed by default.
Sanitize additional HTTP headers - only Authorization
is removed by default.
Can be one of "http"
, "https"
, or "dummy"
.
NOTE DSN component - set automatically if DSN provided.
Can be one of "http"
, "https"
, or "dummy"
.
NOTE DSN component - set automatically if DSN provided.
Secret key for authentication with the Sentry server.
DEPRECATED This is deprecated and not necessary for newer Sentry installations any more.
NOTE If you provide a DSN, this will be set automatically.
Secret key for authentication with the Sentry server.
DEPRECATED This is deprecated and not necessary for newer Sentry installations any more.
NOTE If you provide a DSN, this will be set automatically.
Provide a configurable Proc
callback to determine event capture.
NOTE Object passed into the block will be a String
(messages)
or an Exception
.
->(obj : Exception | String) { obj.some_attr == false }
Provide a configurable Proc
callback to determine event capture.
NOTE Object passed into the block will be a String
(messages)
or an Exception
.
->(obj : Exception | String) { obj.some_attr == false }
Optional Proc
, called when the Sentry server cannot be contacted
for any reason.
->(event : Raven::Event::HashType) {
spawn { MyJobProcessor.send_email(event) }
}
Optional Proc
, called when the Sentry server cannot be contacted
for any reason.
->(event : Raven::Event::HashType) {
spawn { MyJobProcessor.send_email(event) }
}