openwpm.utilities.multiprocess_utils module

class openwpm.utilities.multiprocess_utils.Process(*args, **kwargs)[source]

Bases: Process

Wrapper Process class that includes exception logging

run()[source]

Method to be run in sub-process; can be overridden in sub-class

openwpm.utilities.multiprocess_utils.kill_process_and_children(parent_process: Process, logger, timeout: int = 20) None[source]

Attempts to recursively kill the entire process tree under a given parent process

openwpm.utilities.multiprocess_utils.parse_traceback_for_sentry(tb)[source]

Parse traceback to send Sentry-compatible strings

Sentry appears to limit each extra string to 500 characters. This splits the traceback string across N chunks of at most 500 characters each. Chunks are split at newlines for readability. Traceback lines over 500 characters are still truncated.

Parameters:

tb (list of strings) – Traceback formatted such that each list item is a new line.