-
Notifications
You must be signed in to change notification settings - Fork 121
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
Standardized dev options: enabled, transmit, output, verbose #456
Conversation
@ArturMoczulski , didn't we want to have a list of "EnvironmentsToTransmitFor" list option instead of the "Transmit" bool option? |
@akornich I would prefer boolean wherever possible so the user can define their logic, which may be based on environment, but could be based on other logic. It also makes it more sensible for dynamically changing the value at runtime. This also means the SDK doesn't have to know what environments the app has defined. See the example in this PR description: #449 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The response dump needs to get removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Closes #453
transmit
(default:true
) which makes the SDK skip callingsend
andsendBatch
onsender
objectsoutput
(default:false
) which makes the SDK dump the payload andResponse
object to the configuredoutput_logger
(default:\Monolog\Logger
with\Monolog\Handler\ErrorLogHandler
)verbose
(default:\Rollbar\Config::VERBOSE_NONE
) which writes all verbose messages to configuredverbose_logger
(default: default:\Monolog\Logger
with\Monolog\Handler\ErrorLogHandler
)verbose
config option are\Psr\Log\LogLevel
values in compliance with https://tools.ietf.org/html/rfc5424 rather than custom config options suggested in the original specverbose
supports\Rollbar\Config::VERBOSE_NONE
which makes the SDK not verbose (except foroutput
messages configured by a separateoutput
option)output_logger
andverbose_logger
are independent.output_logger
is configurable solely with a booleanoutput
config option;verbose_logger
is configurable with\Psr\Log\LogLevel
verbosity levelverbose
is set):\Rollbar\RollbarLogger::log
info
:Attempting to log: [$level] ...
alwaysnotice
:Rollbar is disabled
whenenabled == false
error
:Invalid log level '$level'.
when invalid log level is passed toRollbarLogger
info
:Occurrence ignored
when an occurrence is ignored due to any reason covered by\Rollbar\Config::internalCheckIgnored
info
:Occurrence ignored
when an occurrence is ignored due to any reason covered by\Rollbar\Config::checkIgnore
error
:Occurrence rejected by the SDK: $response
when the SDK rejected the occurrence for any reason resulting in response status0
error
:Occurrence rejected by the API: $response
when the API rejected the occurrence for any reason resulting in HTTP response status code400+
info
:Occurrence successfully logged
always on successful report\Rollbar\RollbarLogger::send
warning
:Maximum number of items per request has been reached. If you want to report more items, please use
max_itemsconfiguration option.
when transmission stopped due to exceeding themax_items
config optiondebug
:Added payload to the queue (running in
batchedmode).
always when the occurrence is added to the queue (batched == true
)\Rollbar\RollbarLogger::flush
debug
:Queue flushed
always\Rollbar\Config::shouldIgnoreError
debug
:Ignore (error below allowed error_reporting level)
whenuse_error_reporting == true
and the PHP error's level is below configured PHP'serror_reporting
leveldebug
:Ignore due to included_errno level
when PHP error's level is not included in configuredincluded_errno
debug
:Skip due to error sample rating
when PHP error is skipped due to configurederror_sample_rates
\Rollbar\Config::shouldIgnoreException
debug
:Skip exception due to exception sample rating
when an exception is skipped due to configuredexception_sample_rates
\Rollbar\Config::checkIgnored
info
:Occurrence ignored due to custom checkIgnore logic
when an occurrence is ignored due tocheck_ignore
callback evaluating totrue
error
:Exception occurred in the custom checkIgnore logic: $exceptionMessage
when an exception is thrown incheck_ignore
callbackdebug
:Occurrence's level is too low
when occurrence's level is below configuredminimum_level
debug
:Custom filter result: true/false
always whenfilter
is configured\Rollbar\Config::send
warning
:Not transmitting (transmitting disabled in configuration)
when not transmitting due totransmit == false
\Rollbar\Config::sendBatch
warning
:Not transmitting (transmitting disabled in configuration)
when not transmitting due totransmit == false
\Rollbar\Config::internalCheckIgnored
debug
:Ignoring (error reporting has been disabled in PHP config)
when PHP'serror_reporting === 0
debug
:Occurrence's level is too low
when occurrence's level is below configuredminimum_level
\Rollbar\Config::handleResponse
debug
:Applying custom response handler: get_class($this->responseHandler)
when applying configuredresponseHandler
\Rollbar\Truncation\Truncation::truncate
debug
:Applying truncation strategy get_class($strategy)
always when applying a truncation strategy to payload