aws_xray_sdk.core.utils package

Submodules

aws_xray_sdk.core.utils.atomic_counter module

class aws_xray_sdk.core.utils.atomic_counter.AtomicCounter(initial=0)

Bases: object

A helper class that implements a thread-safe counter.

decrement(num=1)
get_current()
increment(num=1)
reset()

aws_xray_sdk.core.utils.compat module

aws_xray_sdk.core.utils.compat.is_classmethod(func)
aws_xray_sdk.core.utils.compat.is_instance_method(parent_class, func_name, func)

aws_xray_sdk.core.utils.conversion module

aws_xray_sdk.core.utils.conversion.metadata_to_dict(obj)

Convert object to dict with all serializable properties like: dict, list, set, tuple, str, bool, int, float, type, object, etc.

aws_xray_sdk.core.utils.search_pattern module

aws_xray_sdk.core.utils.search_pattern.wildcard_match(pattern, text, case_insensitive=True)

Performs a case-insensitive wildcard match against two strings. This method works with pseduo-regex chars; specifically ? and * are supported. An asterisk (*) represents any combination of characters. A question mark (?) represents any single character. :param str pattern: the regex-like pattern to be compared against :param str text: the string to compare against the pattern :param boolean case_insensitive: dafault is True return whether the text matches the pattern

aws_xray_sdk.core.utils.sqs_message_helper module

class aws_xray_sdk.core.utils.sqs_message_helper.SqsMessageHelper

Bases: object

static isSampled(sqs_message)

aws_xray_sdk.core.utils.stacktrace module

aws_xray_sdk.core.utils.stacktrace.get_stacktrace(limit=None)

Get a full stacktrace for the current state of execution.

Include the current state of the stack, minus this function. If there is an active exception, include the stacktrace information from the exception as well.

Parameters:

limit (int) – Optionally limit stack trace size results. This parmaeters has the same meaning as the limit parameter in traceback.print_stack.

Returns:

List of stack trace objects, in the same form as traceback.extract_stack.

Module contents