structlog_sentry_logger._config

Module contents

class structlog_sentry_logger._config.SentryBreadcrumbJsonProcessor(level=30, breadcrumb_level=20, active=True, as_extra=True, tag_keys=None)[source]

Bases: structlog_sentry.SentryJsonProcessor

Addresses: SentryJsonProcessor breaks logging breadcrumbs #25 (source)

Parameters
  • level (int) – events of this or higher levels will be reported to Sentry.

  • active (bool) – a flag to make this processor enabled/disabled.

  • as_extra (bool) – send event_dict as extra info to Sentry.

  • tag_keys (Union[List[str], str, None]) – a list of keys. If any if these keys appear in event_dict, the key and its corresponding value in event_dict will be used as Sentry event tags. use “__all__” to report all key/value pairs of event as tags.

  • breadcrumb_level (int) –

Return type

None

static save_breadcrumb(logger, event_dict)[source]
structlog_sentry_logger._config.deduce_module(prev_stack_frame)[source]
structlog_sentry_logger._config.get_caller_name(prev_stack_frame)[source]
structlog_sentry_logger._config.get_caller_name_from_frames(stack_frames)[source]
structlog_sentry_logger._config.get_git_root()[source]
structlog_sentry_logger._config.get_logger()[source]

Convenience function that returns a logger

Returns: A proxy that creates a correctly configured logger bound to the __name__ of the calling module

Return type

Any

structlog_sentry_logger._config.get_namespaced_module_name(__file__)[source]
structlog_sentry_logger._config.get_root_dir()[source]
structlog_sentry_logger._config.is_caller_main(caller_name)[source]
structlog_sentry_logger._config.set_logging_config(module_name, timestamper)[source]
structlog_sentry_logger._config.set_structlog_config(timestamper)[source]