We use pyrollbar to capture error/exception information on python modules which run as jobs. On rollbar, we are seeing many reports that show something like this:
...
if settings.ROLLBAR_API_KEY:
rollbar.init(
settings.ROLLBAR_API_KEY,
settings.ROLLBAR_ENVIRONMENT,
scrub_fields=settings.ROLLBAR_SCRUB_FIELDS,
)
# Send to rollbar all WARNING or higher logs
rollbar_warn_logger = rollbar.logger.RollbarHandler()
rollbar_warn_logger.setLevel(logging.WARNING)
rollbar_warn_logger.addFilter(f)
log.addHandler(rollbar_warn_logger)
...
Expectation
From what I understand, our code throws exceptions without any additional arguments. I would have expected that all instances of () would have been interpreted to a [] when converted to rolllbar payload.
Additional Information
The data is transformed to payload in _build_payload (line 1339, rollbar/init.py). Stepping through this, I noticed that the data didn't have any CircularReferences until after transformation via traverse (line 88 rollbar/lib/traverse.py). It appears that the id function is used to hash the key argument to a unique identifier inside memo. However, the id function will always return the same value for an empty tuple input. I couldn't find documentation on how to properly add an empty tuple to an allowed circular types - though I think this issue may be somewhat similar?: https://github.com/rollbar/pyrollbar/issues/286
System: macOS Catalina 10.15.7 Python: 3.6.13 Rollbar: 0.15.0
Problem
We use pyrollbar to capture error/exception information on python modules which run as jobs. On rollbar, we are seeing many reports that show something like this:
Below is the code that sets up the logger:
Expectation
From what I understand, our code throws exceptions without any additional arguments. I would have expected that all instances of
()
would have been interpreted to a[]
when converted to rolllbar payload.Additional Information
The data is transformed to payload in
_build_payload
(line 1339, rollbar/init.py). Stepping through this, I noticed that the data didn't have any CircularReferences until after transformation viatraverse
(line 88 rollbar/lib/traverse.py). It appears that theid
function is used to hash thekey
argument to a unique identifier insidememo
. However, theid
function will always return the same value for an empty tuple input. I couldn't find documentation on how to properly add an empty tuple to an allowed circular types - though I think this issue may be somewhat similar?: https://github.com/rollbar/pyrollbar/issues/286