def tag(**tags):
    """
    Tags current transaction. Both key and value of the tag should be strings.
    """
    transaction = execution_context.get_transaction()
    if not transaction:
        error_logger.warning("Ignored tags %s. No transaction currently active.", ", ".join(tags.keys()))
    else:
        transaction.tag(**tags)
Tags current transaction. Both key and value of the tag should be strings.